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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user