[Python-checkins] cpython (3.2): Issue #12096: Fix a race condition in test_threading.test_waitfor(). Patch

victor.stinner python-checkins at python.org
Wed May 18 00:20:48 CEST 2011


http://hg.python.org/cpython/rev/a6b4a00fb1c7
changeset:   70179:a6b4a00fb1c7
branch:      3.2
parent:      70174:1c6823317a06
user:        Victor Stinner <victor.stinner at haypocalc.com>
date:        Wed May 18 00:16:14 2011 +0200
summary:
  Issue #12096: Fix a race condition in test_threading.test_waitfor(). Patch
written by Charles-François Natali.

files:
  Lib/test/lock_tests.py |  2 +-
  Misc/NEWS              |  3 +++
  2 files changed, 4 insertions(+), 1 deletions(-)


diff --git a/Lib/test/lock_tests.py b/Lib/test/lock_tests.py
--- a/Lib/test/lock_tests.py
+++ b/Lib/test/lock_tests.py
@@ -472,7 +472,7 @@
                 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
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -75,6 +75,9 @@
 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.
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list