fix: extend ccproxy health check timeout from 10 to 30 seconds
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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"):
|
||||
|
||||
Reference in New Issue
Block a user