From: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Date: Sun, 5 Mar 2023 06:45:22 +0000 (+0530) Subject: GH-97546: fix flaky asyncio `test_wait_for_race_condition` test (#102421) X-Git-Tag: v3.12.0a6~22 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a74cd3ba5de1aad1a1e1ee57328b54c22be47f77;p=thirdparty%2FPython%2Fcpython.git GH-97546: fix flaky asyncio `test_wait_for_race_condition` test (#102421) --- diff --git a/Lib/test/test_asyncio/test_waitfor.py b/Lib/test/test_asyncio/test_waitfor.py index ed80540b2b38..d5c02ba4a01d 100644 --- a/Lib/test/test_asyncio/test_waitfor.py +++ b/Lib/test/test_asyncio/test_waitfor.py @@ -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")