test(plane): resume-timeout test leaves room for two fake-ax calls under host load

Each fake ax call is a Python subprocess (0.3-1 s on a loaded host); a 0.3 s
resume timeout fit only one, so the test failed whenever the host was busy.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo
This commit is contained in:
Marius Ciepluch
2026-10-02 08:05:34 +02:00
co-authored by Claude Opus 5.5
parent 30cde99e2d
commit 5ab2c25a43
+3 -1
View File
@@ -517,7 +517,9 @@ def test_resume_retries_deadline_exceeded_and_completion_is_the_delivery(fake: F
def test_resume_gives_up_after_the_resume_timeout_with_the_last_error(fake: Fake, tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setenv("OUSAST_RESUME_TIMEOUT", "0.3")
# Long enough for two fake-ax resume calls (each a Python subprocess, ~0.3-1 s under host load) with the 0.02 s
# poll doubling between them; 0.3 s allowed only one on a loaded host and made the test flaky.
monkeypatch.setenv("OUSAST_RESUME_TIMEOUT", "4")
fake.script({**SCRIPT, "repo-facts": {**SCRIPT["repo-facts"], "resume_failures": 1000}})
assert reconciler.run(write_run(tmp_path, "stuck"), ax=str(fake.ax)) == "failed"
reason = state_of("stuck")["tasks"]["repo-facts"]["reason"]