The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(docker): a stalled docker exec is one failed poll attempt, not the verdict
Tekniumccb3f388f7ea
diff --git a/tests/docker/conftest.py b/tests/docker/conftest.pyindex 6597c068121..79817e698da 100644--- a/tests/docker/conftest.py+++ b/tests/docker/conftest.py@@ -242,7 +242,12 @@ def poll_container(end = time.monotonic() + deadline_slast = ""while time.monotonic() < end:- r = docker_exec_sh(container, probe, user=user, timeout=10)+ try:+ r = docker_exec_sh(container, probe, user=user, timeout=10)+ except subprocess.TimeoutExpired:+ # A stalled ``docker exec`` (busy daemon on a loaded runner) is one failed attempt,+ # not the verdict: keep polling until the deadline like any other non-zero probe.+ continuelast = r.stdoutif r.returncode == 0:return True, lastdiff --git a/tests/docker/test_dashboard.py b/tests/docker/test_dashboard.pyindex 7a7b762136d..ce59de958d8 100644--- a/tests/docker/test_dashboard.py+++ b/tests/docker/test_dashboard.py@@ -13,6 +13,7 @@ the realistic runtime context. See the conftest module docstring.from __future__ import annotationsimport json+import subprocessimport timefrom tests.docker.conftest import docker_exec, docker_exec_sh, start_container, poll_container@@ -97,7 +98,11 @@ except urllib.error.HTTPError as h:end = time.monotonic() + deadline_slast_err = ""while time.monotonic() < end:- r = docker_exec_sh(container, probe, timeout=10)+ try:+ r = docker_exec_sh(container, probe, timeout=10)+ except subprocess.TimeoutExpired as exc:+ last_err = f"docker exec stalled: {exc}" # a busy daemon: retry until the deadline+ continueif r.returncode == 0 and r.stdout.strip():lines = r.stdout.split("\n", 1)try: