Skip to content

Commit df11bf3

Browse files
committed
Ignore broken barrier errors when waiting on the barrier in the main process
1 parent ff70843 commit df11bf3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Lib/test/test_concurrent_futures/executor.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,10 @@ def test_shutdown_notifies_cancelled_futures(self):
243243
for index in range(count)]
244244

245245
self.executor.shutdown(wait=False, cancel_futures=True)
246-
barrier.wait()
246+
try:
247+
barrier.wait()
248+
except threading.BrokenBarrierError:
249+
pass
247250

248251
for future in fs:
249252
self.assertRaises((FalseyBoolException, futures.CancelledError),

0 commit comments

Comments
 (0)