Title: test_asyncgen: race condition on test_async_gen_asyncio_gc_aclose_09(), random failure
Type: Stage: resolved
Components: asyncio Versions: Python 3.7
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: asvetlov, vstinner, yselivanov
Priority: normal Keywords:

Created on 2018-01-24 10:10 by vstinner, last changed 2018-05-29 21:46 by vstinner. This issue is now closed.

Messages (2)
msg310580 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-01-24 10:10
test_asyncgen.test_async_gen_asyncio_gc_aclose_09() fails randomly. It looks like a race condition, likely related to the system load.

Run tests in parallel using 4 child processes
test_async_gen_asyncio_gc_aclose_09 (test.test_asyncgen.AsyncGenAsyncioTest) ... Task was destroyed but it is pending!
task: <Task pending coro=<async_generator_athrow()> wait_for=<Future finished result=None>>

FAIL: test_async_gen_asyncio_gc_aclose_09 (test.test_asyncgen.AsyncGenAsyncioTest)
Traceback (most recent call last):
  File "C:\projects\cpython\lib\test\", line 630, in test_async_gen_asyncio_gc_aclose_09
    self.assertEqual(DONE, 1)
AssertionError: 0 != 1


Re-running test 'test_asyncgen' in verbose mode
test_async_gen_asyncio_gc_aclose_09 (test.test_asyncgen.AsyncGenAsyncioTest) ... ok
Ran 40 tests in 1.125s
msg318101 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-05-29 21:46
I didn't see this failure recently.
Date User Action Args
2018-05-29 21:46:55vstinnersetstatus: open -> closed
resolution: out of date
messages: + msg318101

stage: resolved
2018-01-24 10:10:20vstinnercreate