Kaydet (Commit) d4d1d068 authored tarafından Charles-François Natali's avatar Charles-François Natali

Issue #11871: In test_threading.BarrierTests, bump the default barrier timeout

to avoid timing-dependent failures.
üst 27c4e885
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment