Skip to content

Commit

Permalink
Fix flaky test: test_shutsdown_cleanly (#8582)
Browse files Browse the repository at this point in the history
  • Loading branch information
milesgranger committed Mar 18, 2024
1 parent 8c93366 commit fa4976e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions distributed/cli/tests/test_dask_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,9 +493,9 @@ def test_dashboard_non_standard_ports():
# use internal ip instead of localhost ip to verify GlobalProxyHandler will update
# to allow internal host ip of a worker.
w_host = get_ip()
s_port = "3233"
s_dashboard_port = "3232"
w_dashboard_port = "4833"
s_port = open_port(s_host)
s_dashboard_port = open_port(s_host)
w_dashboard_port = open_port(w_host)
s_cmd = f"dask scheduler --host {s_host} --port {s_port} --dashboard-address :{s_dashboard_port}"
w_cmd = f"dask worker {s_host}:{s_port} --dashboard-address :{w_dashboard_port} --host {w_host}"

Expand Down
4 changes: 2 additions & 2 deletions distributed/tests/test_jupyter.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ async def test_jupyter_idle_timeout_returned():
@pytest.mark.slow
@pytest.mark.xfail(WINDOWS, reason="Subprocess launching scheduler TimeoutError")
@pytest.mark.xfail(MACOS, reason="Client fails to connect on OSX")
def test_shutsdown_cleanly(loop):
def test_shutsdown_cleanly(requires_default_ports):
port = open_port()
with concurrent.futures.ThreadPoolExecutor() as tpe:
subprocess_fut = tpe.submit(
Expand All @@ -133,7 +133,7 @@ def test_shutsdown_cleanly(loop):
)

# wait until scheduler is running
with Client(f"127.0.0.1:{port}", loop=loop):
with Client(f"127.0.0.1:{port}"):
pass

with requests.Session() as session:
Expand Down

0 comments on commit fa4976e

Please sign in to comment.