Skip to content

Commit 7e5e13d

Browse files
authored
bpo-42553: Fix test_asyncio.test_call_later() (GH-23627)
Fix test_asyncio.test_call_later() race condition: don't measure asyncio performance in the call_later() unit test. The test failed randomly on the CI.
1 parent 2ad9382 commit 7e5e13d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Lib/test/test_asyncio/test_events.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,11 +294,8 @@ def callback(arg):
294294
self.loop.stop()
295295

296296
self.loop.call_later(0.1, callback, 'hello world')
297-
t0 = time.monotonic()
298297
self.loop.run_forever()
299-
t1 = time.monotonic()
300298
self.assertEqual(results, ['hello world'])
301-
self.assertTrue(0.08 <= t1-t0 <= 0.8, t1-t0)
302299

303300
def test_call_soon(self):
304301
results = []
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Fix ``test_asyncio.test_call_later()`` race condition: don't measure asyncio
2+
performance in the ``call_later()`` unit test. The test failed randomly on
3+
the CI.

0 commit comments

Comments
 (0)