]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2353] Use a flag instead of overriding BoB.wait_time
authorMukund Sivaraman <muks@isc.org>
Thu, 29 Nov 2012 02:10:51 +0000 (07:40 +0530)
committerMukund Sivaraman <muks@isc.org>
Thu, 29 Nov 2012 02:10:51 +0000 (07:40 +0530)
src/bin/bind10/bind10_src.py.in
src/bin/bind10/tests/bind10_test.py.in

index 2658ee2dadb31d0f0a4e7f95af9d216efb2642bd..f0a9d6bf8dcaf580ad69ce5fdeec2d479498b910 100755 (executable)
@@ -484,9 +484,8 @@ class BoB:
             time_remaining = time_remaining - 1
             msg, env = self.cc_session.group_recvmsg()
         
-        # wait_time is set to 0 only by unittests
-        if self.wait_time > 0 and not self.process_running(msg,
-                                                           "ConfigManager"):
+        if not self.process_running(msg, "ConfigManager") and \
+                not self.run_under_unittests:
             raise ProcessStartError("Configuration manager process has not started")
 
         return bind_cfgd
index eee942a64a8e775ddc5aa75997c50affb9794efd..bc404267eebaf98728c1d03c600848991726b1ea 100644 (file)
@@ -1644,7 +1644,7 @@ class TestBossComponents(unittest.TestCase):
         bob = MockBobSimple()
         bob.c_channel_env = {}
         bob.cc_session = DummySession()
-        bob.wait_time = 0
+        bob.run_under_unittests = True
 
         # use the MockProcessInfo creator
         bob._make_process_info = bob._make_mock_process_info
@@ -1706,7 +1706,11 @@ class TestBossComponents(unittest.TestCase):
         bob = MockBobSimple()
         bob.c_channel_env = {}
         bob.cc_session = DummySession()
+        # keep the wait time small for the test to complete quickly
         bob.wait_time = 2
+        # specifically set this to False so that the process check is
+        # attempted
+        bob.run_under_unittests = False
 
         # use the MockProcessInfo creator
         bob._make_process_info = bob._make_mock_process_info