Message333868
The test fails once on AMD64 Windows8.1 Non-Debug 3.x when the Python test suite is run in parallel, but pass if the test is run alone (when the system is more "idle").
https://buildbot.python.org/all/#/builders/12/builds/1898
======================================================================
FAIL: test_async_gen_asyncio_gc_aclose_09 (test.test_asyncgen.AsyncGenAsyncioTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\buildarea\3.x.ware-win81-release\build\lib\test\test_asyncgen.py", line 684, in test_async_gen_asyncio_gc_aclose_09
self.assertEqual(DONE, 1)
AssertionError: 0 != 1
It can reproduce the failure on a very busy Windows using 2 terminals:
* python -m test -F -W -j4 test_asyncgen test_asyncgen test_asyncgen test_asyncgen
* python -m test -j0 -r -u all
The first command runs the test 4 times in parallel in a loop until if fails, the second command is just one way to stress the system.
The test is based on time and so has a race condition depending on the exact timing:
def test_async_gen_asyncio_gc_aclose_09(self):
DONE = 0
async def gen():
nonlocal DONE
try:
while True:
yield 1
finally:
await asyncio.sleep(0.01)
await asyncio.sleep(0.01)
DONE = 1
async def run():
g = gen()
await g.__anext__()
await g.__anext__()
del g
await asyncio.sleep(0.1)
self.loop.run_until_complete(run())
self.assertEqual(DONE, 1) |
|
Date |
User |
Action |
Args |
2019-01-17 14:04:27 | vstinner | set | recipients:
+ vstinner |
2019-01-17 14:04:24 | vstinner | set | messageid: <1547733864.78.0.251061521649.issue35760@roundup.psfhosted.org> |
2019-01-17 14:04:24 | vstinner | link | issue35760 messages |
2019-01-17 14:04:24 | vstinner | create | |
|