test: Relax timing assertion in test_abort_works to fix flaky test#1754
Merged
test: Relax timing assertion in test_abort_works to fix flaky test#1754
test_abort_works to fix flaky test#1754Conversation
The test asserts that aborting the pool completes quickly rather than waiting for the full 60s task sleep. The previous 0.3s threshold left only ~0.2s after the initial `asyncio.sleep(0.1)`, which was too tight on loaded CI runners. Increase to 5s which still validates the abort behavior while being resilient to scheduling jitter. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
test_abort_works to fix flaky test
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1754 +/- ##
==========================================
+ Coverage 92.26% 92.34% +0.07%
==========================================
Files 156 156
Lines 10644 10644
==========================================
+ Hits 9821 9829 +8
+ Misses 823 815 -8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Mantisus
approved these changes
Feb 17, 2026
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.
Summary
test_abort_workswas flaky on CI due to an overly tight timing assertion (< 0.3s), which left only ~0.2s of headroom after the initialasyncio.sleep(0.1).5s, which still validates thatabort()cancels tasks promptly (vs the 60s task sleep) while being resilient to CI scheduling jitter.Failed CI runs
Test plan
test_abort_workspasses with relaxed threshold🤖 Generated with Claude Code