From: Mukund Sivaraman Date: Thu, 29 Nov 2012 02:10:51 +0000 (+0530) Subject: [2353] Use a flag instead of overriding BoB.wait_time X-Git-Tag: bind10-1.0.0-beta-release~19^2~50 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=41ccdad87bfc96af06dd83ecd143e4277795eb5f;p=thirdparty%2Fkea.git [2353] Use a flag instead of overriding BoB.wait_time --- diff --git a/src/bin/bind10/bind10_src.py.in b/src/bin/bind10/bind10_src.py.in index 2658ee2dad..f0a9d6bf8d 100755 --- a/src/bin/bind10/bind10_src.py.in +++ b/src/bin/bind10/bind10_src.py.in @@ -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 diff --git a/src/bin/bind10/tests/bind10_test.py.in b/src/bin/bind10/tests/bind10_test.py.in index eee942a64a..bc404267ee 100644 --- a/src/bin/bind10/tests/bind10_test.py.in +++ b/src/bin/bind10/tests/bind10_test.py.in @@ -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