Skip to content

Commit 776ec1e

Browse files
authored
gh-110097: Fix flaky test_timeout in test_concurrent_futures.test_process_pool (gh-131108)
On heavily loaded systems, the launch of the workers to run `time.sleep(0)` can take longer than the five second timeout.
1 parent f30376c commit 776ec1e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: Lib/test/test_concurrent_futures/executor.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ def test_map_timeout(self):
6969
else:
7070
self.fail('expected TimeoutError')
7171

72-
self.assertEqual([None, None], results)
72+
# gh-110097: On heavily loaded systems, the launch of the worker may
73+
# take longer than the specified timeout.
74+
self.assertIn(results, ([None, None], [None], []))
7375

7476
def test_shutdown_race_issue12456(self):
7577
# Issue #12456: race condition at shutdown where trying to post a

0 commit comments

Comments
 (0)