Skip to content

Commit

Permalink
fix test_dashboard_port_zero test
Browse files Browse the repository at this point in the history
  • Loading branch information
fjetter committed Mar 7, 2022
1 parent f01f9e9 commit 73ac0c0
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions distributed/cli/tests/test_dask_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,11 @@ def test_scheduler_port_zero(loop):
def test_dashboard_port_zero(loop):
pytest.importorskip("bokeh")
with popen(["dask-scheduler", "--dashboard-address", ":0"]) as proc:
count = 0
while count < 1:
line = proc.stderr.readline()
if b"dashboard" in line.lower():
sleep(0.01)
count += 1
assert b":0" not in line
for line in proc.stderr:
if b"dashboard at" in line:
dashboard_port = int(line.decode().split(":")[-1].strip())
assert dashboard_port != 0
break


PRELOAD_TEXT = """
Expand Down

0 comments on commit 73ac0c0

Please sign in to comment.