Skip to content

Commit 6c95433

Browse files
iUnknwnpitrou
authored andcommitted
Change test_concurrent_futures.ThreadPoolShutdownTest
Adjust the shutdown test so that, after submitting three jobs to the executor, the test checks for less than three threads, instead of looking for exactly three threads. If idle threads are being recycled properly, then we should have less than three threads.
1 parent 3fa038e commit 6c95433

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/test/test_concurrent_futures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ def test_threads_terminate(self):
349349
self.executor.submit(mul, 21, 2)
350350
self.executor.submit(mul, 6, 7)
351351
self.executor.submit(mul, 3, 14)
352-
self.assertEqual(len(self.executor._threads), 3)
352+
self.assertTrue(len(self.executor._threads) < 3)
353353
self.executor.shutdown()
354354
for t in self.executor._threads:
355355
t.join()

0 commit comments

Comments
 (0)