[Python-checkins] cpython (merge 3.2 -> default): Issue #11871: In test_threading.BarrierTests, bump the default barrier timeout
charles-francois.natali
python-checkins at python.org
Wed Jul 27 21:28:03 CEST 2011
http://hg.python.org/cpython/rev/e8da570d29a8
changeset: 71538:e8da570d29a8
parent: 71535:5f003d725619
parent: 71537:aa9c0fdf2143
user: Charles-François Natali <neologix at free.fr>
date: Wed Jul 27 21:28:23 2011 +0200
summary:
Issue #11871: In test_threading.BarrierTests, bump the default barrier timeout
to avoid timing-dependent failures.
files:
Lib/test/lock_tests.py | 6 +++---
1 files changed, 3 insertions(+), 3 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
@@ -834,12 +834,12 @@
"""
Test the barrier's default timeout
"""
- #create a barrier with a low default timeout
- barrier = self.barriertype(self.N, timeout=0.1)
+ # create a barrier with a low default timeout
+ barrier = self.barriertype(self.N, timeout=0.3)
def f():
i = barrier.wait()
if i == self.N // 2:
- # One thread is later than the default timeout of 0.1s.
+ # One thread is later than the default timeout of 0.3s.
time.sleep(1.0)
self.assertRaises(threading.BrokenBarrierError, barrier.wait)
self.run_threads(f)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list