Skip to content

Commit 698fb2d

Browse files
Pick random dashboard port in tests (#8965)
1 parent 55670a4 commit 698fb2d

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

distributed/tests/test_preload.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ async def test_web_preload_worker():
238238
"urllib3.PoolManager.request",
239239
**{"return_value.data": data},
240240
) as request:
241-
async with Scheduler(port=port, host="localhost") as s:
241+
async with Scheduler(port=port, host="localhost", dashboard_address=":0") as s:
242242
async with Nanny(preload_nanny=["http://example.com/preload"]) as nanny:
243243
assert nanny.scheduler_addr == s.address
244244
assert request.mock_calls == [

distributed/tests/test_scheduler.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4523,7 +4523,7 @@ def test_runspec_regression_sync(loop):
45234523
# https://github.com/dask/distributed/issues/6624
45244524
np = pytest.importorskip("numpy")
45254525
da = pytest.importorskip("dask.array")
4526-
with Client(loop=loop):
4526+
with Client(loop=loop, dashboard_address=":0"):
45274527
v = da.random.random((20, 20), chunks=(5, 5))
45284528

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

distributed/tests/test_utils_test.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1008,9 +1008,9 @@ def test_sizeof_error(input, exc, msg):
10081008
@gen_test()
10091009
async def test_ensure_no_new_clients():
10101010
with ensure_no_new_clients():
1011-
async with Scheduler() as s:
1011+
async with Scheduler(dashboard_address=":0") as s:
10121012
pass
1013-
async with Scheduler() as s:
1013+
async with Scheduler(dashboard_address=":0") as s:
10141014
with ensure_no_new_clients():
10151015
pass
10161016
with pytest.raises(AssertionError):

distributed/tests/test_worker.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ def setup(self, worker=None):
505505

506506
@gen_test()
507507
async def test_plugin_internal_exception():
508-
async with Scheduler(port=0) as s:
508+
async with Scheduler(port=0, dashboard_address=":0") as s:
509509
with raises_with_cause(
510510
RuntimeError,
511511
"Worker failed to start",

0 commit comments

Comments
 (0)