File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1014,13 +1014,15 @@ def test_default_timeout(self):
10141014 """
10151015 Test the barrier's default timeout
10161016 """
1017- # create a barrier with a low default timeout
1018- barrier = self .barriertype (self .N , timeout = 0.3 )
1017+ # gh-109401: Barrier timeout should be long enough
1018+ # to create 4 threads on a slow CI.
1019+ timeout = 1.0
1020+ barrier = self .barriertype (self .N , timeout = timeout )
10191021 def f ():
10201022 i = barrier .wait ()
10211023 if i == self .N // 2 :
1022- # One thread is later than the default timeout of 0.3s .
1023- time .sleep (1.0 )
1024+ # One thread is later than the default timeout.
1025+ time .sleep (timeout * 2 )
10241026 self .assertRaises (threading .BrokenBarrierError , barrier .wait )
10251027 self .run_threads (f )
10261028
You can’t perform that action at this time.
0 commit comments