Skip to content

[Rust Frontend] Fix flaky tls_handshake_timeout_drops_silent_client test - #47873

Merged
BugenZhao merged 2 commits into
vllm-project:mainfrom
tahsintunan:rust/fix-flaky-tls-handshake-test
Jul 15, 2026
Merged

BugenZhao merged 2 commits into
vllm-project:mainfrom
tahsintunan:rust/fix-flaky-tls-handshake-test

Conversation

@tahsintunan

Copy link
Copy Markdown
Contributor

Summary

  • Problem: the test manually advanced the paused clock and raced the handshake close against the socket read, making it flaky.
  • Reproduce: for i in $(seq 20); do cargo nextest run -p vllm-server tls_handshake_timeout_drops_silent_client; done
  • Fix: drop the manual advance/yield_now, let tokio's paused clock auto-advance a bare read().await, and assert the close lands at the handshake deadline (20/20 after).

Signed-off-by: Tahsin Tunan <tahsintunan@gmail.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@mergify mergify Bot added the rust label Jul 7, 2026
@BugenZhao

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@tahsintunan tahsintunan Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@BugenZhao BugenZhao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@BugenZhao BugenZhao added the ready ONLY add when PR is ready to merge/full CI is needed label Jul 15, 2026
@BugenZhao
BugenZhao enabled auto-merge (squash) July 15, 2026 10:39
@BugenZhao
BugenZhao merged commit 1b30ae4 into vllm-project:main Jul 15, 2026
24 checks passed
@tahsintunan
tahsintunan deleted the rust/fix-flaky-tls-handshake-test branch July 15, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed rust

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants