From b283e736e57da6f1febf6fda62fa4fed24e7222f Mon Sep 17 00:00:00 2001 From: Dylan Hurd Date: Thu, 7 May 2026 03:08:21 -0400 Subject: [PATCH] test: deflake realtime sideband close test --- codex-rs/core/tests/suite/realtime_conversation.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/codex-rs/core/tests/suite/realtime_conversation.rs b/codex-rs/core/tests/suite/realtime_conversation.rs index 232d2380b0..ea54bdb8fa 100644 --- a/codex-rs/core/tests/suite/realtime_conversation.rs +++ b/codex-rs/core/tests/suite/realtime_conversation.rs @@ -662,7 +662,10 @@ async fn conversation_webrtc_close_while_sideband_connecting_drops_pending_join( let realtime_server = start_websocket_server_with_headers(vec![WebSocketConnectionConfig { requests: vec![vec![]], response_headers: Vec::new(), - accept_delay: Some(Duration::from_millis(500)), + // Keep the sideband handshake pending beyond the stale-event observation window below. + // Slow CI runners can otherwise complete the mock accept before the close path gets to + // abort the sideband task, which makes the negative handshake assertion scheduler-racy. + accept_delay: Some(Duration::from_secs(5)), close_after_requests: false, }]) .await;