mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
Revert "perf(docker-tests): halve poll intervals from 0.5s to 0.25s"
This reverts commit a7c778e3ba.
This commit is contained in:
parent
a7c778e3ba
commit
65addc2c4f
3 changed files with 8 additions and 8 deletions
|
|
@ -276,7 +276,7 @@ def poll_container(
|
|||
probe: str,
|
||||
*,
|
||||
deadline_s: float = 30.0,
|
||||
interval_s: float = 0.25,
|
||||
interval_s: float = 0.5,
|
||||
user: str = "hermes",
|
||||
) -> tuple[bool, str]:
|
||||
"""Repeatedly run ``probe`` inside the container until it exits 0 or
|
||||
|
|
@ -343,7 +343,7 @@ def wait_for_log(
|
|||
|
||||
|
||||
def wait_for_docker_logs(
|
||||
container: str, needle: str, *, deadline_s: float = 30.0, interval_s: float = 0.25,
|
||||
container: str, needle: str, *, deadline_s: float = 30.0, interval_s: float = 0.5,
|
||||
) -> str:
|
||||
"""Poll ``docker logs`` until ``needle`` appears or deadline expires.
|
||||
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ def test_dashboard_restarts_after_crash(
|
|||
if first_pids:
|
||||
first_pid = first_pids[0]
|
||||
break
|
||||
time.sleep(0.25)
|
||||
time.sleep(0.5)
|
||||
assert first_pid is not None, "Could not capture initial dashboard PID"
|
||||
|
||||
# Kill the dashboard. The dashboard process runs as hermes, so the
|
||||
|
|
@ -180,7 +180,7 @@ def test_dashboard_restarts_after_crash(
|
|||
pids = r.stdout.strip().split() if r.returncode == 0 else []
|
||||
if pids and pids[0] != first_pid:
|
||||
return # success
|
||||
time.sleep(0.25)
|
||||
time.sleep(0.5)
|
||||
|
||||
raise AssertionError(
|
||||
f"Dashboard not restarted after kill (first_pid={first_pid})"
|
||||
|
|
@ -255,7 +255,7 @@ except urllib.error.HTTPError as h:
|
|||
last_err = f"parse: {exc!r} / stdout={r.stdout!r}"
|
||||
else:
|
||||
last_err = f"rc={r.returncode} stderr={r.stderr!r}"
|
||||
time.sleep(0.25)
|
||||
time.sleep(0.5)
|
||||
raise AssertionError(
|
||||
f"Probe of {path} never returned HTTP within {deadline_s}s; "
|
||||
f"last error: {last_err}"
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ def _wait_for_gateway_or_exit(
|
|||
)
|
||||
if pgrep.returncode == 0:
|
||||
return "running"
|
||||
time.sleep(0.25)
|
||||
time.sleep(0.5)
|
||||
return status
|
||||
|
||||
|
||||
|
|
@ -380,7 +380,7 @@ def test_dashboard_supervised_when_env_set(
|
|||
if _svstat_wants_up(container_name, "gateway-default"):
|
||||
ok_gateway = True
|
||||
break
|
||||
time.sleep(0.25)
|
||||
time.sleep(0.5)
|
||||
assert ok_gateway, (
|
||||
f"gateway-default slot not want-up: {_svstat(container_name)!r}"
|
||||
)
|
||||
|
|
@ -391,7 +391,7 @@ def test_dashboard_supervised_when_env_set(
|
|||
if _svstat_wants_up(container_name, "dashboard"):
|
||||
ok_dash = True
|
||||
break
|
||||
time.sleep(0.25)
|
||||
time.sleep(0.5)
|
||||
assert ok_dash, (
|
||||
f"dashboard slot not want-up: {_svstat(container_name, 'dashboard')!r}"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue