Skip to content

Commit

Permalink
Optimistically try to bypass timeout error when waiting for scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
milesgranger committed Mar 13, 2024
1 parent 04c5415 commit a9b764b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions distributed/tests/test_jupyter.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,14 @@ def test_shutsdown_cleanly(loop):
)

# wait until scheduler is running
with Client(f"127.0.0.1:{port}", loop=loop):
pass
try:
with Client(f"127.0.0.1:{port}", loop=loop):
pass
except OSError as exc:
if "Timed out" in str(exc):
pass # Sporadic timeout error (raised as OSError) when trying to connect
else:
raise

with requests.Session() as session:
session.get("http://127.0.0.1:8787/jupyter/lab").raise_for_status()
Expand Down

0 comments on commit a9b764b

Please sign in to comment.