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
This commit is contained in:
Adam Perry @ OpenAI
2026-07-21 01:10:54 +00:00
committed by copyberry
parent 88fac6fe10
commit c0cd337766

View File

@@ -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 {