Issue #11790: Fix sporadic failures in test_multiprocessing.WithProcessesTestCondition.
authorAntoine Pitrou <solipsis@pitrou.net>
Sat, 16 Apr 2011 19:02:01 +0000 (21:02 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Sat, 16 Apr 2011 19:02:01 +0000 (21:02 +0200)
Lib/test/test_multiprocessing.py
Misc/NEWS

index 768119c4c87ff6bfb6930f08d58edc0530b58bd0..2614689bca94cd5a1eb6e2537ff31ca972deb50f 100644 (file)
@@ -757,7 +757,13 @@ class _TestCondition(BaseTestCase):
         cond.release()
 
         # check they have all woken
-        time.sleep(DELTA)
+        for i in range(10):
+            try:
+                if get_value(woken) == 6:
+                    break
+            except NotImplementedError:
+                break
+            time.sleep(DELTA)
         self.assertReturnsIfImplemented(6, get_value, woken)
 
         # check state is not mucked up
index f5f08e431b08a1bdbe52285d7f7823251cb08c00..fa8f039b82c30d36bef9cec1f85418ea3ab99e37 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -269,6 +269,8 @@ Extensions
 Tests
 -----
 
+- Issue #11790: Fix sporadic failures in test_multiprocessing.WithProcessesTestCondition.
+
 - Fix possible "file already exists" error when running the tests in parallel.
 
 - Issue #11719: Fix message about unexpected test_msilib skip on non-Windows