fix: extend ccproxy health check timeout from 10 to 30 seconds

This commit is contained in:
X-iZhang
2026-03-17 22:51:02 +00:00
parent d5e50a690e
commit 53699f9a4e
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -165,8 +165,8 @@ def start_ccproxy(port: int) -> subprocess.Popen:
stderr=subprocess.DEVNULL,
)
# Wait for health
deadline = time.monotonic() + 10
# Wait for health (ccproxy can take up to ~11s on first start)
deadline = time.monotonic() + 30
while time.monotonic() < deadline:
if proc.poll() is not None:
raise RuntimeError(
@@ -182,7 +182,7 @@ def start_ccproxy(port: int) -> subprocess.Popen:
proc.wait(timeout=3)
except subprocess.TimeoutExpired:
proc.kill()
raise RuntimeError("ccproxy did not become healthy within 10 seconds")
raise RuntimeError("ccproxy did not become healthy within 30 seconds")
def stop_ccproxy(proc: subprocess.Popen | None) -> None:
+1 -1
View File
@@ -144,7 +144,7 @@ class TestStartCcproxy:
proc.poll.return_value = None
mock_popen.return_value = proc
# Simulate time passing beyond deadline
mock_time.monotonic.side_effect = [0, 0, 11]
mock_time.monotonic.side_effect = [0, 0, 31]
mock_time.sleep = MagicMock()
with pytest.raises(RuntimeError, match="did not become healthy"):