I'm getting a failure in CI (on Windows) that produces the log output below. I believe it's due to the test case being unreliable since it uses fixed sleep durations, i.e. time.sleep(0.2). The test would be more reliable if it used bounded waits.
FAIL: test_imap_and_imap_unordered_with_buffersize_when_buffer_is_full (test.test_multiprocessing_spawn.test_threads.WithThreadsTestPool.test_imap_and_imap_unordered_with_buffersize_when_buffer_is_full) (method_name='imap')
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\a\cpython\cpython\Lib\test\support\__init__.py", line 1121, in wrapper
func(self, *args, **kwargs, **subtest_kwargs)
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\a\cpython\cpython\Lib\test\_test_multiprocessing.py", line 3227, in test_imap_and_imap_unordered_with_buffersize_when_buffer_is_full
self.assertEqual(last_produced_task_arg.value, processes + 2)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 5 != 6
Bug report
I'm getting a failure in CI (on Windows) that produces the log output below. I believe it's due to the test case being unreliable since it uses fixed sleep durations, i.e.
time.sleep(0.2). The test would be more reliable if it used bounded waits.CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows
Linked PRs