]> granicus.if.org Git - python/commitdiff
Issue #12096: Fix a race condition in test_threading.test_waitfor(). Patch
authorVictor Stinner <victor.stinner@haypocalc.com>
Tue, 17 May 2011 22:16:14 +0000 (00:16 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Tue, 17 May 2011 22:16:14 +0000 (00:16 +0200)
written by Charles-François Natali.

Lib/test/lock_tests.py
Misc/NEWS

index ff30d41fb80bfb436c83885952de35239faa92fd..f0a24117f474a2011176c0d1e8fc7f2b9d1620c8 100644 (file)
@@ -472,7 +472,7 @@ class ConditionTests(BaseTestCase):
                 self.assertEqual(state, 4)
         b = Bunch(f, 1)
         b.wait_for_started()
-        for i in range(5):
+        for i in range(4):
             time.sleep(0.01)
             with cond:
                 state += 1
index c40136cca60c6ba2216d1bd3c64877d813bbefaf..eae29528ab31e4c5aeedc07a6049ad8bf5f4605d 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -75,6 +75,9 @@ Tools/Demos
 Tests
 -----
 
+- Issue #12096: Fix a race condition in test_threading.test_waitfor(). Patch
+  written by Charles-François Natali.
+
 - Issue #11614: import __hello__ prints "Hello World!". Patch written by
   Andreas Stührk.