Skip to content

Commit

Permalink
use the loop fixture in even more tests (#6674)
Browse files Browse the repository at this point in the history
  • Loading branch information
graingert authored Jul 5, 2022
1 parent 1a28011 commit 75f4635
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions distributed/cli/tests/test_dask_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ async def test_signal_handling(c, s, nanny, sig):


@pytest.mark.parametrize("nanny", ["--nanny", "--no-nanny"])
def test_error_during_startup(monkeypatch, nanny):
def test_error_during_startup(monkeypatch, nanny, loop):
# see https://github.com/dask/distributed/issues/6320
scheduler_port = open_port()
scheduler_addr = f"tcp://127.0.0.1:{scheduler_port}"
Expand All @@ -716,7 +716,7 @@ def test_error_during_startup(monkeypatch, nanny):
"--dashboard-address=:0",
],
):
with Client(scheduler_addr) as c:
with Client(scheduler_addr, loop=loop) as c:
with popen(
[
"dask-worker",
Expand Down
2 changes: 1 addition & 1 deletion distributed/deploy/tests/test_adaptive.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def test_basic_no_loop(cleanup):
loop = None
try:
with LocalCluster(
n_workers=0, silence_logs=False, dashboard_address=":0"
n_workers=0, silence_logs=False, dashboard_address=":0", loop=None
) as cluster:
with Client(cluster) as client:
cluster.adapt()
Expand Down
1 change: 1 addition & 0 deletions distributed/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -6854,6 +6854,7 @@ def f(x):
processes=False,
dashboard_address=":0",
worker_dashboard_address=":0",
loop=None,
) as cluster2:
with Client(cluster2) as c1:
c2 = get_client()
Expand Down
4 changes: 2 additions & 2 deletions distributed/tests/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -3600,12 +3600,12 @@ async def test_scheduler_close_fast_deprecated(s, w):
await s.close(fast=True)


def test_runspec_regression_sync():
def test_runspec_regression_sync(loop):
# https://github.com/dask/distributed/issues/6624

da = pytest.importorskip("dask.array")
np = pytest.importorskip("numpy")
with Client():
with Client(loop=loop):
v = da.random.random((20, 20), chunks=(5, 5))

overlapped = da.map_overlap(np.sum, v, depth=2, boundary="reflect")
Expand Down

0 comments on commit 75f4635

Please sign in to comment.