Repository navigation
[serve] Deflake test_batch_size_multiple_zero_timeout on Windows - #67910
Merged
abrarsheikh merged 1 commit intoNov 6, 2026
Merged
abrarsheikh merged 1 commit into
abrarsheikh merged 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request improves the reliability of the unit test 'test_batch_size_multiple_zero_timeout' in 'python/ray/serve/tests/unit/test_batching.py'. It replaces a flaky, short timeout with an explicit 'asyncio.Event' ('batch_started_event') to ensure the first batch has started before subsequent tasks are queued, preventing race conditions particularly on Windows. There are no review comments, so I have no feedback to provide.
The test used a 1 ms wait_for as a proxy for "t1's batch has formed". On Windows the asyncio clock ticks every 15.6 ms, so that timer fires on the next loop iteration. Since ray-project#67877 frees the batch permit in a done callback, the loop is a few iterations behind and t2 joins t1's batch. Wait for t1's batch to start instead. Signed-off-by: john.taylor <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
abrarsheikh
approved these changes
Nov 6, 2026
abrarsheikh
enabled auto-merge (squash)
November 6, 2026 15:53
johntaylor-cell
force-pushed
the
serve-batching-zero-timeout-deflake
branch
from
November 6, 2026 15:54
1ce609b to
fed9db9
Compare
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 test used a 1 ms wait_for as a proxy for "t1's batch has formed". On Windows the asyncio clock ticks every 15.6 ms, so that timer fires on the next loop iteration. Since #67877 frees the batch permit in a done callback, the loop is a few iterations behind and t2 joins t1's batch. Wait for t1's batch to start instead.