diff --git a/backend/tests/api/routes/test_observability.py b/backend/tests/api/routes/test_observability.py index f67e8e2..29e0b45 100644 --- a/backend/tests/api/routes/test_observability.py +++ b/backend/tests/api/routes/test_observability.py @@ -278,7 +278,10 @@ def test_a_running_cascade_reports_how_long_it_has_been_going( f"{PREFIX}/runs", headers=superuser_token_headers, params={"status": "running"} ).json() - assert runs["data"][0]["duration_ms"] >= 30_000 + # By id rather than by position: another module can leave a run of its own + # still marked running, and the list is not this test's alone. + in_flight = next(r for r in runs["data"] if r["id"] == "in-flight") + assert in_flight["duration_ms"] >= 30_000 def test_events_narrow_to_one_minute(