Skip to content

Commit

Permalink
Pick random dashboard port in tests (dask#8965)
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrikmakait authored Dec 13, 2024
1 parent 55670a4 commit 698fb2d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion distributed/tests/test_preload.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ async def test_web_preload_worker():
"urllib3.PoolManager.request",
**{"return_value.data": data},
) as request:
async with Scheduler(port=port, host="localhost") as s:
async with Scheduler(port=port, host="localhost", dashboard_address=":0") as s:
async with Nanny(preload_nanny=["http://example.com/preload"]) as nanny:
assert nanny.scheduler_addr == s.address
assert request.mock_calls == [
Expand Down
2 changes: 1 addition & 1 deletion distributed/tests/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -4523,7 +4523,7 @@ def test_runspec_regression_sync(loop):
# https://github.com/dask/distributed/issues/6624
np = pytest.importorskip("numpy")
da = pytest.importorskip("dask.array")
with Client(loop=loop):
with Client(loop=loop, dashboard_address=":0"):
v = da.random.random((20, 20), chunks=(5, 5))

overlapped = da.map_overlap(np.sum, v, depth=2, boundary="reflect")
Expand Down
4 changes: 2 additions & 2 deletions distributed/tests/test_utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1008,9 +1008,9 @@ def test_sizeof_error(input, exc, msg):
@gen_test()
async def test_ensure_no_new_clients():
with ensure_no_new_clients():
async with Scheduler() as s:
async with Scheduler(dashboard_address=":0") as s:
pass
async with Scheduler() as s:
async with Scheduler(dashboard_address=":0") as s:
with ensure_no_new_clients():
pass
with pytest.raises(AssertionError):
Expand Down
2 changes: 1 addition & 1 deletion distributed/tests/test_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ def setup(self, worker=None):

@gen_test()
async def test_plugin_internal_exception():
async with Scheduler(port=0) as s:
async with Scheduler(port=0, dashboard_address=":0") as s:
with raises_with_cause(
RuntimeError,
"Worker failed to start",
Expand Down

0 comments on commit 698fb2d

Please sign in to comment.