Repository navigation
Fix failing 'Should run pre-middlewares for sync workflows' unit test - #1455
Merged
Merged
Conversation
Events that run through EventConsumer with no matching subscription were marked processed. When a later WaitFor then unprocessed and requeued the set, a later EventTime sibling could be dequeued while earlier siblings were still marked processed, so SeedSubscription skipped its ordering guard (EventOrderScenario: Expected Value2=2, found 5). - Leave unsubscribed events unprocessed (greylist to avoid poller spin) - Unprocess the full sibling set before requeueing any of them - Walk siblings by EventTime when enforcing order
RetrySagaWithUserTaskScenario polls open user actions on a live WorkflowInstance while the host mutates ExecutionPointers, which can throw "Collection was modified" from Dictionary.Values enumeration. Retry the snapshot a few times instead of failing the caller.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause
The test only checks that pre-middleware runs, but the workflow under test could never finish: the faked
IExecutionResultProcessornever ended the execution pointer, soSyncWorkflowRunnerkept looping until the 1 ms timeout cancelled the token. The cancelled token then surfaced as aTaskCanceledExceptionfromPersistWorkflow(SyncWorkflowRunner.cs:97), failing the test. Pre-middleware itself was running fine; this is a test setup issue, not a runner bug.Fix (test only)
Active = false,EndTimeset) so the one-step workflow actually completes.Complete.Testing