Add regression test for WaitAny join schedule-before-cancel ordering#7341
Merged
sfmskywalker merged 2 commits intobug/7335from Mar 2, 2026
Merged
Add regression test for WaitAny join schedule-before-cancel ordering#7341sfmskywalker merged 2 commits intobug/7335from
sfmskywalker merged 2 commits intobug/7335from
Conversation
…before-cancel regression test) Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update handling of inbound connection based on feedback
Add regression test for WaitAny join schedule-before-cancel ordering
Mar 2, 2026
sfmskywalker
approved these changes
Mar 2, 2026
sfmskywalker
added a commit
that referenced
this pull request
Mar 2, 2026
…fore canceling remaining activities (#7340) * Refactor inbound connection handling to schedule outbound activity before canceling remaining activities * Add regression test for WaitAny join schedule-before-cancel ordering (#7341) * Initial plan * Add integration test for WaitAny join with blocking branch (schedule-before-cancel regression test) Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com> --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
Contributor
Greptile SummaryAdded a comprehensive regression test for the WaitAny join ordering bug (issue #7335) that was fixed in commit 82c69d0. The test creates a flowchart with one fast branch and one blocking branch (using a new Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| test/integration/Elsa.Activities.IntegrationTests/Flow/FlowchartCounterBasedTests.cs | Added well-documented regression test validating WaitAny join ordering fix with blocking branch scenario |
Last reviewed commit: 5167c65
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.
The
WaitAnyjoin in counter-based flowcharts had a latent ordering bug: canceling remaining inbound branches before scheduling the outbound activity meantCompleteIfNoPendingWorkAsynccould fire while the outbound activity was not yet in the scheduler, causing the flowchart to complete prematurely without ever executing the downstream activity.Changes
New regression test in
FlowchartCounterBasedTests—WaitAnyJoin_SchedulesOutboundBeforeCancelingBlockedBranchWriteLinebranch and aBlockingActivity(inner class that callscontext.CreateBookmark(), simulating Delay/Timer suspension)FlowJoin(WaitAny)→WriteLine("AfterJoin")Inner
BlockingActivity— minimal sealedActivitysubclass that suspends by creating a bookmark; no external dependency onElsa.Workflows.RuntimerequiredAssertions
"AfterJoin"in outputWorkflowStatus.FinishedWorkflowState.Bookmarksempty💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.