From: Charles-François Natali Date: Wed, 27 Jul 2011 19:26:42 +0000 (+0200) Subject: Issue #11871: In test_threading.BarrierTests, bump the default barrier timeout X-Git-Tag: v3.2.2rc1~60 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d4d1d068dcf4e1aaf93772ccc0824207a21606e5;p=thirdparty%2FPython%2Fcpython.git Issue #11871: In test_threading.BarrierTests, bump the default barrier timeout to avoid timing-dependent failures. --- diff --git a/Lib/test/lock_tests.py b/Lib/test/lock_tests.py index f0a24117f474..30148e638a68 100644 --- a/Lib/test/lock_tests.py +++ b/Lib/test/lock_tests.py @@ -832,12 +832,12 @@ class BarrierTests(BaseTestCase): """ 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)