Skip to content

Commit

Permalink
Add regression test for #6320
Browse files Browse the repository at this point in the history
  • Loading branch information
fjetter committed May 19, 2022
1 parent f4a25eb commit 9e343f0
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions distributed/cli/tests/test_dask_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,3 +735,23 @@ async def test_signal_handling(c, s, nanny, sig):
assert "timed out" not in logs
assert "error" not in logs
assert "exception" not in logs


@pytest.mark.parametrize("nanny", ["--nanny", "--no-nanny"])
def test_error_during_startup(monkeypatch, nanny):
# see https://github.com/dask/distributed/issues/6320
scheduler_port = 8786
scheduler_addr = f"tcp://127.0.0.1:{scheduler_port}"

monkeypatch.setenv("DASK_SCHEDULER_ADDRESS", scheduler_addr)
with popen(["dask-scheduler"]):
with popen(
[
"dask-worker",
scheduler_addr,
nanny,
"--worker-port",
str(scheduler_port),
],
) as worker:
assert worker.wait(5) == 1

0 comments on commit 9e343f0

Please sign in to comment.