https://github.com/python/cpython/commit/776ec1e16728c6febd879e682afcd13d3bc7b53f
commit: 776ec1e16728c6febd879e682afcd13d3bc7b53f
branch: main
author: Sam Gross <[email protected]>
committer: colesbury <[email protected]>
date: 2025-03-12T13:16:23-04:00
summary:
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.
files:
M Lib/test/test_concurrent_futures/executor.py
diff --git a/Lib/test/test_concurrent_futures/executor.py
b/Lib/test/test_concurrent_futures/executor.py
index dc92d2d7e4af92..0221c28b3ceb8b 100644
--- a/Lib/test/test_concurrent_futures/executor.py
+++ b/Lib/test/test_concurrent_futures/executor.py
@@ -69,7 +69,9 @@ def test_map_timeout(self):
else:
self.fail('expected TimeoutError')
- self.assertEqual([None, None], results)
+ # gh-110097: On heavily loaded systems, the launch of the worker may
+ # take longer than the specified timeout.
+ self.assertIn(results, ([None, None], [None], []))
def test_shutdown_race_issue12456(self):
# Issue #12456: race condition at shutdown where trying to post a
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]