The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(agent): make aux timeout FD test deterministic
KoNit-K6c05cbf4bd40
diff --git a/tests/agent/test_codex_aux_timeout_fd_ownership.py b/tests/agent/test_codex_aux_timeout_fd_ownership.pyindex 1758e13e144..0366e8f9b07 100644--- a/tests/agent/test_codex_aux_timeout_fd_ownership.py+++ b/tests/agent/test_codex_aux_timeout_fd_ownership.py@@ -71,13 +71,15 @@ class TestCodexAuxiliaryTimeoutFdOwnership:shutdown(); the real close() must land on the owning thread in theadapter's ``finally``."""- def _stalled():- deadline = time.monotonic() + 30.0- while time.monotonic() < deadline:- time.sleep(0.02)- yield SimpleNamespace(type="response.in_progress")+ def _one_keepalive_then_block():+ # Let the owner process one keepalive, then keep it inside the+ # stream past the watchdog window. The Timer is consequently+ # the only deadline observer that can win this timeout.+ yield SimpleNamespace(type="response.in_progress")+ time.sleep(1.0)+ yield SimpleNamespace(type="response.in_progress")- adapter, events = _adapter_with_recording_client(_stalled())+ adapter, events = _adapter_with_recording_client(_one_keepalive_then_block())owner_tid = threading.get_ident()def _consume(stream, *, model, on_event):