test: deflake is_finished assertions in shared request queue mode - #1087
Open
vdusek wants to merge 1 commit into
Open
test: deflake is_finished assertions in shared request queue mode#1087vdusek wants to merge 1 commit into
vdusek wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1087 +/- ##
==========================================
+ Coverage 92.24% 92.27% +0.03%
==========================================
Files 51 51
Lines 3249 3249
==========================================
+ Hits 2997 2998 +1
+ Misses 252 251 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
vdusek
marked this pull request as ready for review
August 11, 2026 08:02
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.
test_request_queue_is_finished_and_is_empty[shared]failed on master(run 31375518173)
with
assert not True.In shared access mode
is_finished()answers from the queue head listing, which is eventuallyconsistent: right after a committed
add_requestthe head can still come back empty with no lockedrequests, so the queue briefly reports itself as finished. The test asserted that negative condition
with a single immediate read, while every positive assertion around it already polls.
Both negative
is_finishedassertions now poll withpoll_until_conditionand the mode-appropriaterq_poll_timeout, so they tolerate the propagation window without losing their meaning - in singlemode the timeout is
0, so it stays a single strict read, and a queue that never stops reportingitself as finished still fails.
Verified by injecting the lag deterministically (first head listing after each add forced empty):
the current test reproduces the exact CI failure, the updated one passes 25/25 runs under the same
condition. The whole module also passes under
--numprocesses=auto.✍️ Drafted by Claude Code