-
Notifications
You must be signed in to change notification settings - Fork 805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding mutable state builder tests - adding continue-as-new events #5768
adding mutable state builder tests - adding continue-as-new events #5768
Conversation
…b.com:davidporter-id-au/cadence into refactor/adding-mutable-state-builder-tests-i
Codecov Report
Additional details and impacted files
... and 8 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Pull Request Test Coverage Report for Build 018e2a7e-1aec-4241-9bfd-665ab32ccb6dDetails
💛 - Coveralls |
td.expectedReturnedState.RunID = "a run id" | ||
resultExecutionInfo.RunID = "a run id" | ||
td.expectedReturnedState.CreateRequestID = "a request id" | ||
resultExecutionInfo.CreateRequestID = "a request id" | ||
for _, historyEvent := range returnedBuilder.GetHistoryBuilder().history { | ||
if historyEvent.WorkflowExecutionStartedEventAttributes != nil { | ||
historyEvent.WorkflowExecutionStartedEventAttributes.OriginalExecutionRunID = "a run id" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another option for such fields that are not predictable to validate in tests is to use cmpopts.IgnoreFields
and cmp.Diff
instead of assert.Equal
. Example https://github.com/uber/cadence/blob/a614c4c1fd1cf94b3722193cec919985304c9acb/common/types/mapper/thrift/shared_test.go#L1407
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair point, I didn't know it had that param.
I would like to refactor the code so that this param can be passed in (I hate when functions use time.Now, uuid generation or math.rand in the middle of their logic) but that can wait.
service/history/execution/mutable_state_builder_add_continue_as_new_event_test.go
Show resolved
Hide resolved
4d513c0
into
cadence-workflow:master
What changed?
Adds some unit tests to the mutable state builder around the Continue-as-new event.
Why?
How did you test it?
Potential risks
Release notes
Documentation Changes