Closed
Description
Bug report
Bug description:
The following test fails frequently, but not consistently:
test_timeout (test.test_concurrent_futures.test_wait.ThreadPoolWaitTests.test_timeout) ... FAIL
0.86s
======================================================================
FAIL: test_timeout (test.test_concurrent_futures.test_wait.ThreadPoolWaitTests.test_timeout)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\a\cpython\cpython\Lib\test\test_concurrent_futures\test_wait.py", line 129, in test_timeout
self.assertEqual(set([CANCELLED_AND_NOTIFIED_FUTURE,
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
EXCEPTION_FUTURE,
^^^^^^^^^^^^^^^^^
SUCCESSFUL_FUTURE]),
^^^^^^^^^^^^^^^^^^^^
finished)
^^^^^^^^^
AssertionError: Items in the second set but not the first:
<Future at 0x20000554620 state=finished returned NoneType>
As seen in the following CI runs for recent commits to main
- https://github.com/python/cpython/actions/runs/12549107170/job/34989573917
- https://github.com/python/cpython/actions/runs/12527558956/job/34941261499
- https://github.com/python/cpython/actions/runs/12533132642/job/34952530854
- https://github.com/python/cpython/actions/runs/12529744428/job/34945648292
- https://github.com/python/cpython/actions/runs/12505440015/job/34888819142
A brief analysis of the code at
looks like the sleeping future
is present in the finished
set instead of pending
CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows
Originally posted by @zanieb in python/cpython#128364
Metadata
Assignees
Labels
No labels