@@ -613,7 +613,9 @@ def fake_sidecar_fct(
613613 )
614614 assert published_computation_task [0 ].node_id in image_params .fake_tasks
615615 # creating a new future shows that it is not done????
616- assert not distributed .Future (published_computation_task [0 ].job_id ).done ()
616+ assert not distributed .Future (
617+ published_computation_task [0 ].job_id , client = dask_client .backend .client
618+ ).done ()
617619
618620 # as the task is published on the dask-scheduler when sending, it shall still be published on the dask scheduler
619621 list_of_persisted_datasets = await dask_client .backend .client .list_datasets () # type: ignore
@@ -636,7 +638,9 @@ def fake_sidecar_fct(
636638 assert isinstance (task_result , TaskOutputData )
637639 assert task_result .get ("some_output_key" ) == 123
638640 # try to create another future and this one is already done
639- assert distributed .Future (published_computation_task [0 ].job_id ).done ()
641+ assert distributed .Future (
642+ published_computation_task [0 ].job_id , client = dask_client .backend .client
643+ ).done ()
640644
641645
642646async def test_abort_computation_tasks (
@@ -1022,7 +1026,9 @@ def fake_remote_fct(
10221026
10231027 assert published_computation_task [0 ].node_id in cpu_image .fake_tasks
10241028 # let's get a dask future for the task here so dask will not remove the task from the scheduler at the end
1025- computation_future = distributed .Future (key = published_computation_task [0 ].job_id )
1029+ computation_future = distributed .Future (
1030+ key = published_computation_task [0 ].job_id , client = dask_client .backend .client
1031+ )
10261032 assert computation_future
10271033
10281034 await _assert_wait_for_task_status (
0 commit comments