From: Michal 'vorner' Vaner Date: Tue, 11 Jun 2013 09:22:09 +0000 (+0200) Subject: [2922] Limit number of attempts during tests X-Git-Tag: bind10-1.2.0beta1-release~406^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=779d5913cc017664e72d4e6008b1e7dced1a6ae4;p=thirdparty%2Fkea.git [2922] Limit number of attempts during tests --- diff --git a/src/bin/msgq/tests/msgq_run_test.py b/src/bin/msgq/tests/msgq_run_test.py index b0d3f0ac32..ca01192e50 100644 --- a/src/bin/msgq/tests/msgq_run_test.py +++ b/src/bin/msgq/tests/msgq_run_test.py @@ -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")