fix: widen keepalive test timeout to eliminate CI flake
keepalive_connection_survives_with_pong_responses set ping_ms=100, timeout_ms=250, so the server's pong-deadline fired ~560ms after the first ping — only ~60ms past the end of the test's 500ms await window. Under CI scheduler jitter that 60ms slack was insufficient and the server timer fired inside the test window, closing the connection mid-await and producing a flake. Bump timeout_ms to 2000ms so the pong-deadline cannot fire within the test window under any realistic jitter. ping_ms stays at 100ms so the test still exercises multiple ping/pong rounds in the same wall-clock budget. Test still passes locally; was hitting 964's merge gate as a flake.
This commit is contained in:
@@ -234,7 +234,11 @@ async fn keepalive_connection_survives_with_pong_responses() {
|
||||
use tokio_tungstenite::{accept_async, connect_async};
|
||||
|
||||
let ping_ms = 100u64;
|
||||
let timeout_ms = 250u64;
|
||||
// Generous timeout so the server's pong-deadline cannot fire within the
|
||||
// test window even under CI scheduler jitter (the previous 250ms value
|
||||
// gave only ~60ms of slack past the test's await window, which was a
|
||||
// recurring source of flakes on CI).
|
||||
let timeout_ms = 2000u64;
|
||||
|
||||
let listener = TcpListener::bind("127.0.0.1:0").await.unwrap();
|
||||
let addr = listener.local_addr().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user