Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
779d5913
Commit
779d5913
authored
Jun 11, 2013
by
Michal 'vorner' Vaner
Browse files
[2922] Limit number of attempts during tests
parent
523e679d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bin/msgq/tests/msgq_run_test.py
View file @
779d5913
...
...
@@ -312,12 +312,13 @@ class MsgqRunTest(unittest.TestCase):
# do so manually.
synchronised
=
False
attempts
=
100
while
not
synchronised
:
while
not
synchronised
and
attempts
>
0
:
time
.
sleep
(
0.1
)
seq
=
conn
.
group_sendmsg
({
'command'
:
[
'Are you running?'
]},
'Msgq'
,
want_answer
=
True
)
msg
=
conn
.
group_recvmsg
(
nonblock
=
False
,
seq
=
seq
)
synchronised
=
msg
[
0
]
!=
-
1
attempts
-=
1
self
.
assertTrue
(
synchronised
)
# The actual test
conn
.
group_subscribe
(
"notifications/cc_members"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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