mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
Fix a lost wakeup in the unified exec termination test (#47814)
Use `notify_one()` instead of `notify_waiters()` in `terminating_initial_exec_command_rechecks_initial_response_state` to retain the release notification if the termination waiter has not registered yet. This prevents the test from timing out due to a missed notification. GitOrigin-RevId: d233ffc50e016eb75752fd360a4d846de0063683
This commit is contained in:
@@ -661,7 +661,8 @@ async fn terminating_initial_exec_command_rechecks_initial_response_state() -> a
|
||||
.store(false, std::sync::atomic::Ordering::Release);
|
||||
}
|
||||
|
||||
allow_terminate.notify_waiters();
|
||||
// Retain the release even if the sole termination waiter has not registered yet.
|
||||
allow_terminate.notify_one();
|
||||
let terminated = tokio::time::timeout(Duration::from_secs(2), terminate_task)
|
||||
.await
|
||||
.expect("terminate should finish")
|
||||
|
||||
Reference in New Issue
Block a user