test(resilience): 34 tests for preflight/classifier/backoff/breaker (ORCH-1)
Covers preflight FAIL->queued + cache, transient/permanent classifier + Retry-After, exp backoff + available_at gating, launcher transient vs permanent finalize, circuit breaker open/half-open/closed. test_queue worker tests stub preflight OK. Popen never spawned.
This commit is contained in:
@@ -236,6 +236,12 @@ class TestObservability:
|
||||
# QueueWorker max_concurrency (launch_job fully mocked — no real Popen)
|
||||
# ---------------------------------------------------------------------------
|
||||
class TestWorkerConcurrency:
|
||||
@pytest.fixture(autouse=True)
|
||||
def _ok_preflight(self, monkeypatch):
|
||||
# ORCH-1 resilience: the worker gates claims behind preflight; in tests there
|
||||
# is no claude binary, so stub preflight OK to exercise pure queue/concurrency.
|
||||
monkeypatch.setattr("src.queue_worker.preflight.check", lambda *a, **k: (True, "ok"))
|
||||
|
||||
def test_worker_respects_max_concurrency(self, monkeypatch):
|
||||
from src.queue_worker import QueueWorker
|
||||
|
||||
|
||||
Reference in New Issue
Block a user