fix(tests): unpin test_recover_interrupted_only_old from STUCK_THRESHOLD_MINUTES (was -5min fresh / now -30sec so threshold can move freely)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -30,9 +30,14 @@ def test_recover_interrupted_only_old(db_sync, monkeypatch):
|
|||||||
batch_id = _make_batch(db_sync)
|
batch_id = _make_batch(db_sync)
|
||||||
now = datetime.now(UTC)
|
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(
|
fresh = ImportTask(
|
||||||
batch_id=batch_id, source_path="/import/a.jpg", task_type="media",
|
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(
|
stale = ImportTask(
|
||||||
batch_id=batch_id, source_path="/import/b.jpg", task_type="media",
|
batch_id=batch_id, source_path="/import/b.jpg", task_type="media",
|
||||||
|
|||||||
Reference in New Issue
Block a user