changeset: 71538:e8da570d29a8 parent: 71535:5f003d725619 parent: 71537:aa9c0fdf2143 user: Charles-François Natali date: Wed Jul 27 21:28:23 2011 +0200 files: Lib/test/lock_tests.py description: Issue #11871: In test_threading.BarrierTests, bump the default barrier timeout to avoid timing-dependent failures. diff -r 5f003d725619 -r e8da570d29a8 Lib/test/lock_tests.py --- a/Lib/test/lock_tests.py Wed Jul 27 19:42:05 2011 +0200 +++ b/Lib/test/lock_tests.py Wed Jul 27 21:28:23 2011 +0200 @@ -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)