[Python-checkins] cpython (3.2): Issue #11871: In test_threading.BarrierTests, bump the default barrier timeout
charles-francois.natali
python-checkins at python.org
Wed Jul 27 21:28:00 CEST 2011
http://hg.python.org/cpython/rev/aa9c0fdf2143
changeset: 71537:aa9c0fdf2143
branch: 3.2
parent: 71534:2bc740a83010
user: Charles-François Natali <neologix at free.fr>
date: Wed Jul 27 21:26:42 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
@@ -832,12 +832,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