Repository navigation
Conversation
Collaborator
|
The issue has been fixed by #7513 |
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_bench_sandbox_prewarm.py::test_prewarm_reused_survives_a_coarse_clock_tiefails at random on busy machines, including in CI — it just took down theUnit Testsshard 4 run for #7505, and it reproduced 2 of 3 local runs on a tree that did not touch it.The cause is the setup, not the assertion. The test quantizes
time.monotonic()to 15 ms and then spins until a fresh bucket starts, relying on the whole overlap scenario — several awaits, a scheduled task, and two events — finishing inside that remaining tick. When the machine is slow, the tool request lands in the next bucket and the precondition assert fires before the actual regression is even exercised.This replaces the race with a frozen clock:
The test still pins #7044: with the original strict timestamp comparison restored in
bench_prewarm.py, it fails (assert False is Trueonprewarm_reused), because equal timestamps never satisfy<.Verified:
pytest tests/test_bench_sandbox_prewarm.py→ 19 passed, five consecutive runs (previously 1 of 3 passed on the same machine);ruff checkandruff format --checkclean.