fix(tests): repair test_maintenance — skips_fresh_running tail was orphaned at module scope by the inserted ml/archive sweep tests (F841/F821)
This commit is contained in:
@@ -256,6 +256,12 @@ def test_recover_stalled_task_runs_skips_fresh_running(db_sync):
|
||||
recovered = recover_stalled_task_runs.apply().get()
|
||||
assert recovered == 0
|
||||
|
||||
db_sync.expire_all()
|
||||
status = db_sync.execute(
|
||||
select(TaskRun.status).where(TaskRun.id == fresh_id)
|
||||
).scalar_one()
|
||||
assert status == "running"
|
||||
|
||||
|
||||
def test_recover_stalled_task_runs_ml_queue_uses_longer_threshold(db_sync):
|
||||
"""ml-queue tasks (tag_and_embed video branch) legitimately run
|
||||
@@ -344,12 +350,6 @@ def test_recover_stalled_task_runs_archive_task_uses_longer_threshold(db_sync):
|
||||
assert _status(archive_fresh_id) == "running"
|
||||
assert _status(archive_stale_id) == "error"
|
||||
|
||||
db_sync.expire_all()
|
||||
status = db_sync.execute(
|
||||
select(TaskRun.status).where(TaskRun.id == fresh_id)
|
||||
).scalar_one()
|
||||
assert status == "running"
|
||||
|
||||
|
||||
def test_prune_task_runs_deletes_ok_older_than_24h(db_sync):
|
||||
from sqlalchemy import select
|
||||
|
||||
Reference in New Issue
Block a user