Skip to content

Commit d5280bf

Browse files
test(automation): widen fake codex app-server success timeout under load
Flake #5: the codex app-server / model backend tests (the success-path `codex_app_server_*` / `fake_codex_app_server_*` cases) flaked under parallel execution. `fake_codex_response_timeout()` was 5s on non-Windows — the budget for the fake codex child (a real python interpreter) to spawn and complete its scripted turn. Under process-per-test parallelism that spawn can be scheduled slowly enough to exceed 5s, yielding a spurious "timed out waiting for codex app-server response". Fix (test only): use a uniform generous 30s success-path budget (matching the prior Windows value). Tests that deliberately exercise the timeout path pass their own tight `Duration` (e.g. 300ms) and are unaffected. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 895b90e commit d5280bf

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

tests/automation_runner_test/backend.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,15 @@ use crate::common::{
2424

2525
static ENV_LOCK: Mutex<()> = Mutex::new(());
2626

27+
/// Success-path budget for the fake codex app-server child to spawn (a real
28+
/// python interpreter) and complete its scripted turn. This is the upper bound
29+
/// the backend waits before declaring a timeout; it must be generous enough
30+
/// that a slow python spawn/schedule under nextest's process-per-test
31+
/// parallelism can never false-fire it, while still failing fast on a genuine
32+
/// hang. Tests that deliberately exercise the timeout path pass their own tight
33+
/// `Duration` (e.g. 300ms) and are unaffected by this value.
2734
fn fake_codex_response_timeout() -> Duration {
28-
if cfg!(windows) {
29-
Duration::from_secs(30)
30-
} else {
31-
Duration::from_secs(5)
32-
}
35+
Duration::from_secs(30)
3336
}
3437

3538
fn fake_codex_response_timeout_secs() -> u64 {

0 commit comments

Comments
 (0)