From 100b8137e519ebe4df17aacd3967cd3a486461e1 Mon Sep 17 00:00:00 2001 From: Watch Date: Mon, 23 Nov 2026 01:39:25 +0000 Subject: [PATCH] fix(tests): increase Windows test timeout to 120s for output_token_limit tests Windows runners are significantly slower. Increase the deadline from 60s to 120s for the main test timeout, and from 30s to 60s for the internal mock server connection deadlines. This avoids spurious test failures on Windows CI. --- .../rusty-claude-cli/tests/output_token_limit.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/rust/crates/rusty-claude-cli/tests/output_token_limit.rs b/rust/crates/rusty-claude-cli/tests/output_token_limit.rs index 80caf36c..8f25c94c 100644 --- a/rust/crates/rusty-claude-cli/tests/output_token_limit.rs +++ b/rust/crates/rusty-claude-cli/tests/output_token_limit.rs @@ -27,7 +27,9 @@ fn max_output_tokens_reaches_openai_compatible_tool_roundtrip() { let server = thread::spawn(move || { let mut requests = Vec::new(); for turn in 0..2 { - let deadline = Instant::now() + Duration::from_secs(30); + // Windows runners are slower; use a longer timeout on Windows to avoid spurious failures. + let deadline_secs = if cfg!(windows) { 60 } else { 30 }; + let deadline = Instant::now() + Duration::from_secs(deadline_secs); let mut stream = loop { match listener.accept() { Ok((stream, _)) => break stream, @@ -275,7 +277,9 @@ fn output_with_deadline(command: &mut Command) -> Output { let mut child = command.spawn().expect("claw should launch"); // Release the parent's file handles before workspace cleanup on Windows. command.stdout(Stdio::null()).stderr(Stdio::null()); - let deadline = Instant::now() + Duration::from_secs(60); + // Windows runners are slower; use a longer timeout on Windows to avoid spurious failures. + let timeout_secs = if cfg!(windows) { 120 } else { 60 }; + let deadline = Instant::now() + Duration::from_secs(timeout_secs); let (status, timed_out) = loop { if let Some(status) = child.try_wait().expect("poll claw") { break (status, false); @@ -293,7 +297,7 @@ fn output_with_deadline(command: &mut Command) -> Output { }; assert!( !timed_out, - "claw exceeded the 60-second test deadline; child terminated\nstdout:\n{}\nstderr:\n{}", + "claw exceeded the {timeout_secs}-second test deadline; child terminated\nstdout:\n{}\nstderr:\n{}", String::from_utf8_lossy(&output.stdout), String::from_utf8_lossy(&output.stderr), );