Kyle Stanley <[email protected]> added the comment:
I can confirm Victor's method of reproducing the failure consistently, by using
asyncio.sleep(1e-9) within `RunCoroutineThreadsafeTests.add()` instead of the
current asyncio.sleep(0.05).
I also experimented with adjusting the sleep time, to figure out the "breaking
point" where I could no longer run `./python -m test test_asyncio -m
test_run_coroutine_threadsafe_with_timeout -v -F` without failures (within
~10,000 tests). From my results, the lowest reliable value was 0.001. At 1e-4,
I was able to consistently reproduce the failure reported above:
FAIL: test_run_coroutine_threadsafe_with_timeout
(test.test_asyncio.test_tasks.RunCoroutineThreadsafeTests)
Test coroutine submission from a thread to an event loop
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/aeros/repos/cpython/Lib/test/test_asyncio/test_tasks.py", line
3210, in test_run_coroutine_threadsafe_with_timeout
self.loop.run_until_complete(future)
AssertionError: TimeoutError not raised
The failure becomes increasingly consistent with lowered time as expected, but
at 1e-5 I was able to repeatedly reproduce the failure within 10 iterations of
the test. At 1e-4 it took around 3000 iterations before failing (across
multiple runs).
----------
nosy: +aeros
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue38564>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com