File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212from dask .utils import format_bytes
1313from distributed import Client
1414from distributed .utils_test import gen_test
15- from distributed .worker import get_worker
1615
1716import dask_cuda
1817import dask_cuda .proxify_device_objects
@@ -429,9 +428,9 @@ async def test_worker_force_spill_to_disk():
429428 ddf = dask .dataframe .from_pandas (df , npartitions = 1 ).persist ()
430429 await ddf
431430
432- async def f ():
431+ async def f (dask_worker ):
433432 """Trigger a memory_monitor() and reset memory_limit"""
434- w = get_worker ()
433+ w = dask_worker
435434 # Set a host memory limit that triggers spilling to disk
436435 w .memory_manager .memory_pause_fraction = False
437436 memory = w .monitor .proc .memory_info ().rss
@@ -443,7 +442,7 @@ async def f():
443442 assert w .monitor .proc .memory_info ().rss < memory - 10 ** 7
444443 w .memory_manager .memory_limit = memory * 10 # Un-limit
445444
446- await client .submit (f )
445+ client .run (f )
447446 log = str (await client .get_worker_logs ())
448447 # Check that the worker doesn't complain about unmanaged memory
449448 assert "Unmanaged memory use is high" not in log
You can’t perform that action at this time.
0 commit comments