Repository navigation
Disconnect tests: give the hanging client seconds, not 0.2 s, to be reached - #13272
Merged
Merged
Conversation
…eached test_non_streaming_proxy_disconnect_returns_499[openai_embeddings] timed out in Backend CI (l-r) on #13221 and #13240 waiting 0.2 s for the route to reach HangingCancelableClient. The route gets there in milliseconds, but the first embeddings call on a loaded, cold xdist worker can take longer. The 0.5 s bound after the disconnect is five polls of the 0.1 s watcher, equally tight. Both are upper bounds only, so raise them to 10 s and 5 s through named constants used by all seven waits in the file; a route that never reaches the client or never notices the disconnect still fails.
Member
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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.
Problem
tests/test_openai_tool_passthrough.py::TestApiMonitorProviderAndCompletionStreams::test_non_streaming_proxy_disconnect_returns_499[openai_embeddings-/v1/embeddings-body1]failed in Backend CI(Python 3.13, l-r)on #13221 and on #13240, two unrelated PRs:The test starts the route, waits 0.2 s for the route to reach
HangingCancelableClient, flips the request to disconnected, then waits 0.5 s for the 499. Locally the route gets there in milliseconds and the test passes 10 of 10 under-n 8. But on a busy xdist worker the first embeddings call does extra setup, and 0.2 s is not enough. The 0.5 s bound is five polls of the 0.1 sis_disconnectedwatcher, so it is just as tight. The product is fine; the timeouts measure the runner. The same 0.2 s / 0.5 s pair appears in four tests in this file (added in 27e124c).Fix
Both waits are upper bounds, not latency checks, so use named constants: 10 s to reach the hanging client and 5 s from disconnect to 499. A comment explains why. All seven waits in the file use the constants.
Verification
-k "disconnect or hanging or cancel")So a slow runner no longer fails these tests, while a route that never notices the disconnect still does.