Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

fix: flaky tests (#9373)

jif-oai2691e1ce218d
diff --git a/codex-rs/utils/pty/src/tests.rs b/codex-rs/utils/pty/src/tests.rs
index cdf9f0824a..8c41d1dbde 100644
--- a/codex-rs/utils/pty/src/tests.rs
+++ b/codex-rs/utils/pty/src/tests.rs
@@ -163,9 +163,11 @@ async fn pipe_and_pty_share_interface() -> anyhow::Result<()> {
spawn_pipe_process(&pipe_program, &pipe_args, Path::new("."), &env_map, &None).await?;
let pty = spawn_pty_process(&pty_program, &pty_args, Path::new("."), &env_map, &None).await?;
+ let timeout_ms = if cfg!(windows) { 10_000 } else { 3_000 };
let (pipe_out, pipe_code) =
- collect_output_until_exit(pipe.output_rx, pipe.exit_rx, 3_000).await;
- let (pty_out, pty_code) = collect_output_until_exit(pty.output_rx, pty.exit_rx, 3_000).await;
+ collect_output_until_exit(pipe.output_rx, pipe.exit_rx, timeout_ms).await;
+ let (pty_out, pty_code) =
+ collect_output_until_exit(pty.output_rx, pty.exit_rx, timeout_ms).await;
assert_eq!(pipe_code, 0);
assert_eq!(pty_code, 0);