test(cron): the run_job FakeFuture double answers done() like the real Future

run_job's finally now asks the worker Future whether it is still running before deciding who tears the session down; the heartbeat test's stand-in future lacked done().
This commit is contained in:
kshitijk4poor
2026-09-06 17:17:57 +00:00
committed by kshitij
parent b114641c88
commit 5f406d88ea
+3
View File
@@ -921,6 +921,9 @@ class TestRunJobSessionPersistence:
def result(self):
return {"final_response": "ok"}
def done(self):
return True # run_job's finally asks the real Future; this one has already returned
fake_future = FakeFuture()
fake_pool = MagicMock()
fake_pool.submit.return_value = fake_future