Skip to content

test: cover empty EndEvent return serialization#446

Open
hjotha wants to merge 2 commits intomendixlabs:mainfrom
hjotha:submit/endevent-empty-return-regression-test
Open

test: cover empty EndEvent return serialization#446
hjotha wants to merge 2 commits intomendixlabs:mainfrom
hjotha:submit/endevent-empty-return-regression-test

Conversation

@hjotha
Copy link
Copy Markdown
Contributor

@hjotha hjotha commented Apr 30, 2026

Closes #445.

Summary

  • Update the EndEvent writer regression test to use an actual empty string ReturnValue.
  • Keep the non-empty return serialization test unchanged for the existing $Result case.

Validation

  • make build
  • go test ./sdk/mpr -run 'TestSerializeEndEvent_EmptyReturnValueHasNoTrailingLineBreak|TestSerializeEndEvent_NonEmptyReturnValueHasNoSyntheticLineBreak' -v
  • make test
  • make lint-go

Symptom: the regression test named as empty EndEvent coverage used the literal string "empty", so it did not prove how the writer serializes an actual empty ReturnValue.

Root cause: the fixture value matched the textual MDL expression for empty instead of the zero-length BSON field value used by void EndEvents.

Fix: set ReturnValue to the empty string and assert that the serialized BSON keeps the ReturnValue field as an empty string.

Tests: ran make build, targeted sdk/mpr EndEvent tests, make test, and make lint-go.
@ako ako added this to the v0.8.0 milestone Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EndEvent writer test should cover actual empty ReturnValue

3 participants