Merge "Wait for ovsdb_monitor to be active before use it"

This commit is contained in:
Jenkins 2016-08-29 07:28:30 +00:00 committed by Gerrit Code Review
commit fad7c62531
3 changed files with 6 additions and 2 deletions

View File

@ -54,7 +54,7 @@ class InterfacePollingMinimizer(base_polling.BasePollingManager):
respawn_interval=ovsdb_monitor_respawn_interval)
def start(self):
self._monitor.start()
self._monitor.start(block=True)
def stop(self):
try:

View File

@ -45,7 +45,7 @@ class TestInterfacePollingMinimizer(base.BaseTestCase):
def test_start_calls_monitor_start(self):
with mock.patch.object(self.pm._monitor, 'start') as mock_start:
self.pm.start()
mock_start.assert_called_with()
mock_start.assert_called_with(block=True)
def test_stop_calls_monitor_stop(self):
with mock.patch.object(self.pm._monitor, 'stop') as mock_stop:

View File

@ -1795,6 +1795,8 @@ class TestOvsNeutronAgent(object):
with mock.patch.object(async_process.AsyncProcess, "_spawn"),\
mock.patch.object(async_process.AsyncProcess, "start"),\
mock.patch.object(async_process.AsyncProcess,
"is_active", return_value=True),\
mock.patch.object(async_process.AsyncProcess, "stop"),\
mock.patch.object(log.KeywordArgumentAdapter,
'exception') as log_exception,\
@ -1877,6 +1879,8 @@ class TestOvsNeutronAgent(object):
def test_rpc_loop_fail_to_process_network_ports_keep_flows(self):
with mock.patch.object(async_process.AsyncProcess, "_spawn"),\
mock.patch.object(async_process.AsyncProcess, "start"),\
mock.patch.object(async_process.AsyncProcess,
"is_active", return_value=True),\
mock.patch.object(async_process.AsyncProcess, "stop"),\
mock.patch.object(
self.mod_agent.OVSNeutronAgent,