Fix flaky Messages_Not_Dispatched_After_Cancellation test#2043
Open
Fix flaky Messages_Not_Dispatched_After_Cancellation test#2043
Conversation
The test strictly asserted zero dispatches after cancellation, but multiple concurrent MultiplexerSubscriber tasks can pass the cancellation check before Cancel() is observed, creating a legitimate race window. Relax the assertion to allow a small number of in-flight dispatches, matching the tolerance pattern used in Sqs_Queue_Is_Not_Polled_After_Cancellation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2043 +/- ##
=======================================
Coverage 78.12% 78.12%
=======================================
Files 149 149
Lines 3895 3895
Branches 646 646
=======================================
Hits 3043 3043
Misses 555 555
Partials 297 297
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…ing test Relax the exact-count assertion to an upper-bound check. The buffer may not fully fill within the 150ms cancellation window, but should never exceed the expected download count (which would indicate the stop-downloading logic is broken). This matches the tolerance approach used in the other flaky test fixes in this branch. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Relax the strict zero-tolerance assertion in
Messages_Not_Dispatched_After_Cancellationto allow up to 2 in-flight dispatches after cancellation. Multiple concurrentMultiplexerSubscribertasks can pass theThrowIfCancellationRequested()check beforeCancel()is observed, creating a legitimate race window. This matches the tolerance pattern already used in the sibling testSqs_Queue_Is_Not_Polled_After_Cancellation.