From: Mukund Sivaraman Date: Thu, 29 Nov 2012 02:22:37 +0000 (+0530) Subject: [2353] Don't run block of code when requested not to by unittests X-Git-Tag: bind10-1.0.0-beta-release~19^2~49 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=145a4ed5a89c92d93303604ceff83ec3d17ff87d;p=thirdparty%2Fkea.git [2353] Don't run block of code when requested not to by unittests --- diff --git a/src/bin/bind10/bind10_src.py.in b/src/bin/bind10/bind10_src.py.in index f0a9d6bf8d..9d6b48d1ad 100755 --- a/src/bin/bind10/bind10_src.py.in +++ b/src/bin/bind10/bind10_src.py.in @@ -474,19 +474,20 @@ class BoB: bind_cfgd.spawn() self.log_started(bind_cfgd.pid) - # Wait for the configuration manager to start up as subsequent initialization - # cannot proceed without it. The time to wait can be set on the command line. - time_remaining = self.wait_time - msg, env = self.cc_session.group_recvmsg() - while time_remaining > 0 and not self.process_running(msg, "ConfigManager"): - logger.debug(DBG_PROCESS, BIND10_WAIT_CFGMGR) - time.sleep(1) - time_remaining = time_remaining - 1 + if not self.run_under_unittests: + # Wait for the configuration manager to start up as + # subsequent initialization cannot proceed without it. The + # time to wait can be set on the command line. + time_remaining = self.wait_time msg, env = self.cc_session.group_recvmsg() + while time_remaining > 0 and not self.process_running(msg, "ConfigManager"): + logger.debug(DBG_PROCESS, BIND10_WAIT_CFGMGR) + time.sleep(1) + time_remaining = time_remaining - 1 + msg, env = self.cc_session.group_recvmsg() - if not self.process_running(msg, "ConfigManager") and \ - not self.run_under_unittests: - raise ProcessStartError("Configuration manager process has not started") + if not self.process_running(msg, "ConfigManager"): + raise ProcessStartError("Configuration manager process has not started") return bind_cfgd