From e8a23d31110a2824368bff0c41f79016d696f613 Mon Sep 17 00:00:00 2001 From: Mukund Sivaraman Date: Thu, 6 Dec 2012 08:32:06 +0530 Subject: [PATCH] [2353] Remove run_under_unittests hack from BoB.start_cfgmgr() --- src/bin/bind10/bind10_src.py.in | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/bin/bind10/bind10_src.py.in b/src/bin/bind10/bind10_src.py.in index 592dc3fb03..00bdb92728 100755 --- a/src/bin/bind10/bind10_src.py.in +++ b/src/bin/bind10/bind10_src.py.in @@ -474,20 +474,19 @@ class BoB: bind_cfgd.spawn() self.log_started(bind_cfgd.pid) - 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 + # 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() - 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"): - 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