Limit test_spill_by_default memory, reenable it
@@ -25,7 +25,7 @@ from distributed.core import rpc
from distributed.client import wait
from distributed.scheduler import Scheduler
from distributed.metrics import time
-from distributed.worker import Worker, error_message, logger, TOTAL_MEMORY
+from distributed.worker import Worker, error_message, logger
from distributed.utils import tmpfile, format_bytes
from distributed.utils_test import (
inc,
@@ -446,11 +446,15 @@ def test_Executor(c, s):
yield w._close()
-@pytest.mark.skip(reason="Leaks a large amount of memory")
-@gen_cluster(client=True, ncores=[("127.0.0.1", 1)], timeout=30)
+@gen_cluster(
+ client=True,
+ ncores=[("127.0.0.1", 1)],
+ timeout=30,
+ worker_kwargs={"memory_limit": 10e6},
+)
def test_spill_by_default(c, s, w):
da = pytest.importorskip("dask.array")
- x = da.ones(int(TOTAL_MEMORY * 0.7), chunks=10000000, dtype="u1")
+ x = da.ones(int(10e6 * 0.7), chunks=1e6, dtype="u1")
y = c.persist(x)
yield wait(y)
assert len(w.data.slow) # something is on disk
