From 3349bca46d66f993e97407ba756e3f515a863fad Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 18 May 2011 00:16:14 +0200 Subject: =?UTF-8?q?Issue=20#12096:=20Fix=20a=20race=20condition=20in=20tes?= =?UTF-8?q?t=5Fthreading.test=5Fwaitfor().=20Patch=20written=20by=20Charle?= =?UTF-8?q?s-Fran=C3=A7ois=20Natali.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Lib/test/lock_tests.py | 2 +- Misc/NEWS | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Lib/test/lock_tests.py b/Lib/test/lock_tests.py index ff30d41..f0a2411 100644 --- a/Lib/test/lock_tests.py +++ b/Lib/test/lock_tests.py @@ -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 diff --git a/Misc/NEWS b/Misc/NEWS index c40136c..eae2952 100644 --- 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. -- cgit v0.12