From 43fe21311ada2bfd88e6e462688f335e4c89a4ca Mon Sep 17 00:00:00 2001 From: Alex Kugel Date: Fri, 28 Aug 2026 18:24:54 +0100 Subject: [PATCH] test(codex): give the blocked-replacement handshake a workable deadline cancellation_while_replacement_startup_is_blocked_aborts_request_state waits for the replacement WebSocket handshake before asserting anything. That wait had a two-second deadline, and the handshake takes about 2.5 seconds, so the test failed on every run here. The assertion is about cancellation cleanup, not about latency, so the deadline only needs enough headroom to stop deciding the result. Five seconds passes 5 runs out of 5, each finishing in about 2.6 seconds. --- src/providers/codex/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/providers/codex/mod.rs b/src/providers/codex/mod.rs index c09f9302..691b8967 100644 --- a/src/providers/codex/mod.rs +++ b/src/providers/codex/mod.rs @@ -2527,7 +2527,7 @@ mod tests { .await }); - tokio::time::timeout(std::time::Duration::from_secs(2), replacement_accepted_rx) + tokio::time::timeout(std::time::Duration::from_secs(5), replacement_accepted_rx) .await .expect("replacement startup did not reach the blocked handshake") .expect("replacement startup acknowledgement sender dropped");