[Rust Frontend] Fix flaky tls_handshake_timeout_drops_silent_client test - #47873
Conversation
Signed-off-by: Tahsin Tunan <tahsintunan@gmail.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0c076729b3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
| let start = tokio::time::Instant::now(); | ||
| let mut buf = [0u8; 1]; | ||
| let read = tokio::time::timeout(Duration::from_secs(1), tcp.read(&mut buf)).await; | ||
| let read = tcp.read(&mut buf).await; |
There was a problem hiding this comment.
Bound the read so the test can fail itself
If the TLS handshake timeout regresses or is not armed, this bare read().await has no test-local timeout and will wait forever under cargo test or any runner/profile that does not apply the new nextest slow-timeout. That turns the regression this test is meant to catch into a hung test process rather than an assertion failure; wrap the read in a Tokio timeout longer than TLS_HANDSHAKE_TIMEOUT so the test fails deterministically.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
This is covered by the slow-timeout in .config/nextest.toml, which terminates a hung test at 120s. Also, nextest is our canonical/only CI runner for the rust workspace (cargo test isn't used).
Summary
for i in $(seq 20); do cargo nextest run -p vllm-server tls_handshake_timeout_drops_silent_client; doneadvance/yield_now, let tokio's paused clock auto-advance a bareread().await, and assert the close lands at the handshake deadline (20/20 after).