bpo-11790: Fix sporadic failures in test_multiprocessing.WithProcessesTestCondition. (#1591)

(cherry picked from commit f25a8de845d20349a265442eb0f3dcd71d0d7ac5)
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py
index 8cc4f54..4d39501 100644
--- a/Lib/test/test_multiprocessing.py
+++ b/Lib/test/test_multiprocessing.py
@@ -840,7 +840,13 @@
         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