Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
fd96eb2a
Commit
fd96eb2a
authored
Jul 27, 2011
by
Charles-François Natali
Browse files
Options
Browse Files
Download
Plain Diff
Issue #11871: In test_threading.BarrierTests, bump the default barrier timeout
to avoid timing-dependent failures.
parents
7a2f0c78
d4d1d068
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Lib/test/lock_tests.py
Lib/test/lock_tests.py
+3
-3
No files found.
Lib/test/lock_tests.py
View file @
fd96eb2a
...
...
@@ -834,12 +834,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.
1
s.
# One thread is later than the default timeout of 0.
3
s.
time
.
sleep
(
1.0
)
self
.
assertRaises
(
threading
.
BrokenBarrierError
,
barrier
.
wait
)
self
.
run_threads
(
f
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment