Skip to content
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

Fix test_stress_creation_and_deletion #7215

Merged
merged 15 commits into from
Nov 3, 2022
Merged
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
11 changes: 3 additions & 8 deletions distributed/tests/test_stress.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from dask import delayed

from distributed import Client, Nanny, wait
from distributed import Client, Nanny, Worker, wait
from distributed.chaos import KillWorker
from distributed.compatibility import WINDOWS
from distributed.metrics import time
Expand Down Expand Up @@ -91,14 +91,10 @@ def test_cancel_stress_sync(loop):
c.cancel(f)


@pytest.mark.xfail(
reason="Flaky and re-fails on rerun. See https://github.com/dask/distributed/issues/5388"
)
@pytest.mark.slow
@gen_cluster(
nthreads=[],
client=True,
timeout=180,
scheduler_kwargs={"allowed_failures": 100_000},
)
async def test_stress_creation_and_deletion(c, s):
Expand All @@ -113,13 +109,12 @@ async def test_stress_creation_and_deletion(c, s):
async def create_and_destroy_worker(delay):
start = time()
while time() < start + 5:
async with Nanny(s.address, nthreads=2) as n:
async with Worker(s.address, nthreads=2) as n:
await asyncio.sleep(delay)
print("Killed nanny")

await asyncio.gather(*(create_and_destroy_worker(0.1 * i) for i in range(20)))

async with Nanny(s.address, nthreads=2):
async with Worker(s.address, nthreads=2):
assert await c.compute(z) == 8000884.93


Expand Down