From c0cd337766ff27a75623c5baba199389f94f2ab3 Mon Sep 17 00:00:00 2001 From: "Adam Perry @ OpenAI" Date: Tue, 21 Jul 2026 01:10:54 +0000 Subject: [PATCH] Increase the patch approval test timeout (#34438) ## Why Patch approval events can take longer than the default test event timeout. ## What changed Wait up to 15 seconds for a patch approval request or turn completion in the approval test helper, while preserving the existing event checks and assertions. GitOrigin-RevId: 73a50538482b5a88ccf0be07f8fad21000e54699 --- codex-rs/core/tests/suite/approvals.rs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/codex-rs/core/tests/suite/approvals.rs b/codex-rs/core/tests/suite/approvals.rs index d6cd44c8c8..7b589bb94c 100644 --- a/codex-rs/core/tests/suite/approvals.rs +++ b/codex-rs/core/tests/suite/approvals.rs @@ -803,12 +803,16 @@ async fn expect_patch_approval( test: &TestCodex, expected_call_id: &str, ) -> ApplyPatchApprovalRequestEvent { - let event = wait_for_event(&test.codex, |event| { - matches!( - event, - EventMsg::ApplyPatchApprovalRequest(_) | EventMsg::TurnComplete(_) - ) - }) + let event = wait_for_event_with_timeout( + &test.codex, + |event| { + matches!( + event, + EventMsg::ApplyPatchApprovalRequest(_) | EventMsg::TurnComplete(_) + ) + }, + Duration::from_secs(15), + ) .await; match event {