Skip to content

Commit

Permalink
Fix flaky test_asyncprocess.py::test_simple
Browse files Browse the repository at this point in the history
  • Loading branch information
crusaderky committed Aug 8, 2023
1 parent ef6d4bf commit af47fc0
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit af47fc0

Please sign in to comment.