[issue38564] test_asyncio: test_run_coroutine_threadsafe_with_timeout()

STINNER Victor report at bugs.python.org
Wed Oct 23 11:03:54 EDT 2019


STINNER Victor <vstinner at python.org> added the comment:

I can reproduce the issue with this patch:

diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py
index dde84b84b1..c94113712a 100644
--- a/Lib/test/test_asyncio/test_tasks.py
+++ b/Lib/test/test_asyncio/test_tasks.py
@@ -3160,7 +3160,7 @@ class RunCoroutineThreadsafeTests(test_utils.TestCase):
 
     async def add(self, a, b, fail=False, cancel=False):
         """Wait 0.05 second and return a + b."""
-        await asyncio.sleep(0.05)
+        await asyncio.sleep(1e-9)
         if fail:
             raise RuntimeError("Fail!")
         if cancel:

and the command:

./python -m test test_asyncio -m test_run_coroutine_threadsafe_with_timeout -v -F

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38564>
_______________________________________


More information about the Python-bugs-list mailing list