-
Notifications
You must be signed in to change notification settings - Fork 97
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
WaitFor #980
Conversation
c4b65d5
to
29a3daa
Compare
This reverts commit ae10042.
b9843c7 passed, but rerunning to check for flakiness |
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.
lgtm
@@ -216,7 +216,8 @@ func CDCFlowWorkflowWithConfig( | |||
RetryPolicy: &temporal.RetryPolicy{ | |||
MaximumAttempts: 20, | |||
}, | |||
SearchAttributes: mirrorNameSearch, | |||
SearchAttributes: mirrorNameSearch, | |||
WaitForCancellation: true, |
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.
Tested it out with cancelling a few sync flows and it's fine to keep it (or remove it - whichever helps more).
NormalizeFlowCountQuery
is stunting implementing decoupled sync/normalize workflows. So replace it withWaitFor
Besides, I just don't like this
ExitAfterRecords
way of doing thingse2e tests are integration tests: implementation should be treated as a black box as much as possible
Temporal has a bunch of capabilities to mock activities so that we can create unit tests for the more intrusive tests that'd be necessary to raise branch coverage etc
WaitFor
presents the ideal mechanism for testing convergent processes: update source, wait for destination to reflect changeIn order to make this change work, however, I needed to use
env.CancelWorkflow
after completing tests since I now want the workflow running indefinitely. It turns out our code doesn't adequately handle cancellation, so implemented that