Skip to content

Pick random dashboard port in tests #8965

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading