Skip to content

Commit 397d88d

Browse files
authored
gh-117344: Skip flaky tests in free-threaded build (#117355)
The tests are not reliable with the GIL disabled. In theory, they can fail with the GIL enabled too, but the failures are much more likely with the GIL disabled.
1 parent f05fb2e commit 397d88d

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Lib/test/test_concurrent_futures/test_process_pool.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ def test_saturation(self):
116116
for _ in range(job_count):
117117
sem.release()
118118

119+
@unittest.skipIf(support.Py_GIL_DISABLED, "gh-117344: test is flaky without the GIL")
119120
def test_idle_process_reuse_one(self):
120121
executor = self.executor
121122
assert executor._max_workers >= 4

Lib/test/test_concurrent_futures/test_thread_pool.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def acquire_lock(lock):
4141
sem.release()
4242
executor.shutdown(wait=True)
4343

44+
@unittest.skipIf(support.Py_GIL_DISABLED, "gh-117344: test is flaky without the GIL")
4445
def test_idle_thread_reuse(self):
4546
executor = self.executor_type()
4647
executor.submit(mul, 21, 2).result()

0 commit comments

Comments
 (0)