diff --git a/tests/test_maintenance.py b/tests/test_maintenance.py index f580916..1484b77 100644 --- a/tests/test_maintenance.py +++ b/tests/test_maintenance.py @@ -30,9 +30,14 @@ def test_recover_interrupted_only_old(db_sync, monkeypatch): batch_id = _make_batch(db_sync) now = datetime.now(UTC) + # "Fresh" must sit comfortably under whatever STUCK_THRESHOLD_MINUTES + # currently is (5 min as of 2026-05-24, tightened from 30); 30 + # seconds is well below any reasonable threshold. "Stale" stays at + # 2 hours so the test remains valid if the threshold ever moves + # back up. fresh = ImportTask( batch_id=batch_id, source_path="/import/a.jpg", task_type="media", - status="processing", started_at=now - timedelta(minutes=5), + status="processing", started_at=now - timedelta(seconds=30), ) stale = ImportTask( batch_id=batch_id, source_path="/import/b.jpg", task_type="media",