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 flaky test_asyncprocess.py::test_simple #8085

Merged
merged 1 commit into from
Aug 9, 2023
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
6 changes: 3 additions & 3 deletions distributed/tests/test_asyncprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ async def test_simple():
with pytest.raises(asyncio.TimeoutError):
await proc.join(timeout=0.02)
dt = time() - t1
assert 0.2 >= dt >= 0.001
assert 0.001 <= dt <= 0.5
assert proc.is_alive()
assert proc.pid is not None
assert proc.exitcode is None
Expand All @@ -97,7 +97,7 @@ async def test_simple():
t1 = time()
await proc.join(timeout=30)
dt = time() - t1
assert dt <= 1.0
assert dt <= 2.0
assert not proc.is_alive()
assert proc.pid is not None
assert proc.exitcode == 0
Expand Down Expand Up @@ -141,7 +141,7 @@ async def test_simple():
await asyncio.sleep(0.01)
gc.collect()
dt = time() - t1
assert dt < 2.0
assert dt < 5.0


@gen_test()
Expand Down
Loading