BIND 10 trac2922, updated. 779d5913cc017664e72d4e6008b1e7dced1a6ae4 [2922] Limit number of attempts during tests
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue Jun 11 09:24:54 UTC 2013
The branch, trac2922 has been updated
via 779d5913cc017664e72d4e6008b1e7dced1a6ae4 (commit)
via 523e679dd68695f1815cfb5e0a31cc7bf4f742f6 (commit)
from e12bb75e5e456ecaaa738936aea36fc255d342f7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 779d5913cc017664e72d4e6008b1e7dced1a6ae4
Author: Michal 'vorner' Vaner <vorner at vorner.cz>
Date: Tue Jun 11 11:22:09 2013 +0200
[2922] Limit number of attempts during tests
commit 523e679dd68695f1815cfb5e0a31cc7bf4f742f6
Author: Michal 'vorner' Vaner <vorner at vorner.cz>
Date: Tue Jun 11 11:20:07 2013 +0200
[2922] Method docs update.
-----------------------------------------------------------------------
Summary of changes:
src/bin/msgq/tests/msgq_run_test.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/msgq/tests/msgq_run_test.py b/src/bin/msgq/tests/msgq_run_test.py
index de72915..ca01192 100644
--- a/src/bin/msgq/tests/msgq_run_test.py
+++ b/src/bin/msgq/tests/msgq_run_test.py
@@ -282,7 +282,10 @@ class MsgqRunTest(unittest.TestCase):
common unit tests in msgq_test.py.
The test is here, because there might be some trouble with multiple
- threads in msgq which would be hard to test using pure unit tests.
+ threads in msgq (see the note about locking on the module CC session
+ when sending message from one thread and listening for commands in the
+ other) which would be hard to test using pure unit tests. Testing
+ runnig whole msgq tests that implicitly.
"""
conn = self.__get_connection()
# Activate the session, pretend to be the config manager.
@@ -309,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")
More information about the bind10-changes
mailing list