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 authored and kshitij committed 2026-09-06 22:56:51 +05:30
1 parent b114641c88
commit 5f406d88ea
1 file changed
+3
+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