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:
Timmy
2026-05-13 15:41:25 +01:00
parent e5d2465f66
commit 246f44d8f3
@@ -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();