]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-97546: fix flaky asyncio `test_wait_for_race_condition` test (#102421)
authorKumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Sun, 5 Mar 2023 06:45:22 +0000 (12:15 +0530)
committerGitHub <noreply@github.com>
Sun, 5 Mar 2023 06:45:22 +0000 (12:15 +0530)
Lib/test/test_asyncio/test_waitfor.py

index ed80540b2b38520e98891c509859009152f205e9..d5c02ba4a01df994f60696865c4302273b89f072 100644 (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")