Skip to content

Commit 9d1983b

Browse files
authored
bpo-11790: Fix sporadic failures in test_multiprocessing.WithProcessesTestCondition. (#1591)
(cherry picked from commit f25a8de)
1 parent eb66897 commit 9d1983b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Lib/test/test_multiprocessing.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,13 @@ def test_notify_all(self):
840840
cond.release()
841841

842842
# check they have all woken
843-
time.sleep(DELTA)
843+
for i in range(10):
844+
try:
845+
if get_value(woken) == 6:
846+
break
847+
except NotImplementedError:
848+
break
849+
time.sleep(DELTA)
844850
self.assertReturnsIfImplemented(6, get_value, woken)
845851

846852
# check state is not mucked up

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ Build
164164
Tests
165165
-----
166166

167+
- bpo-11790: Fix sporadic failures in
168+
test_multiprocessing.WithProcessesTestCondition.
169+
167170
- bpo-30236: Backported test.regrtest options -m/--match and -G/--failfast
168171
from Python 3.
169172

0 commit comments

Comments
 (0)