Skip to content

Commit 77f1b14

Browse files
committed
Fix flaky test process pool.py test
1 parent c696f33 commit 77f1b14

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Lib/test/test_concurrent_futures/test_process_pool.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,11 @@ def test_traceback_when_child_process_terminates_abruptly(self):
115115
with self.assertRaises(BrokenProcessPool) as bpe:
116116
future.result()
117117

118-
cause = bpe.exception.__cause__
118+
for _ in support.sleeping_retry(support.SHORT_TIMEOUT):
119+
cause = bpe.exception.__cause__
120+
if isinstance(cause, futures.process._RemoteTraceback):
121+
break
122+
119123
self.assertIsInstance(cause, futures.process._RemoteTraceback)
120124
self.assertIn(
121125
f"terminated abruptly with exit code {exit_code}", cause.tb

0 commit comments

Comments
 (0)