From f25a8de845d20349a265442eb0f3dcd71d0d7ac5 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sat, 16 Apr 2011 21:02:01 +0200 Subject: Issue #11790: Fix sporadic failures in test_multiprocessing.WithProcessesTestCondition. --- Lib/test/test_multiprocessing.py | 8 +++++++- Misc/NEWS | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py index 768119c..2614689 100644 --- a/Lib/test/test_multiprocessing.py +++ b/Lib/test/test_multiprocessing.py @@ -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 diff --git a/Misc/NEWS b/Misc/NEWS index f5f08e4..fa8f039 100644 --- 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 -- cgit v0.12