diff --git a/EvoScientist/ccproxy_manager.py b/EvoScientist/ccproxy_manager.py index 8648c34..7afa385 100644 --- a/EvoScientist/ccproxy_manager.py +++ b/EvoScientist/ccproxy_manager.py @@ -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: diff --git a/tests/test_ccproxy_manager.py b/tests/test_ccproxy_manager.py index df472de..63ede6b 100644 --- a/tests/test_ccproxy_manager.py +++ b/tests/test_ccproxy_manager.py @@ -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"):