GH-97546: fix flaky asyncio `test_wait_for_race_condition` test (#102421)

This commit is contained in:
Kumar Aditya 2023-03-05 12:15:22 +05:30 committed by GitHub
parent eff9f43924
commit a74cd3ba5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -159,7 +159,7 @@ class AsyncioWaitForTest(unittest.IsolatedAsyncioTestCase):
fut = loop.create_future()
task = asyncio.wait_for(fut, timeout=0.2)
loop.call_later(0.1, fut.set_result, "ok")
loop.call_soon(fut.set_result, "ok")
res = await task
self.assertEqual(res, "ok")