Fix l3_agent unit tests
Mock FixedIntervalLoopingCall in unit tests so _rpc_loop doesn't interfere with the tests fixes bug 1205085 Change-Id: I54cc152890734afc7a5b86dd9ae4ea133bd7574b
This commit is contained in:
parent
32ad89fd8a
commit
0f4f3150f4
@ -77,14 +77,11 @@ class TestBasicRouterOperations(base.BaseTestCase):
|
|||||||
self.plugin_api = mock.Mock()
|
self.plugin_api = mock.Mock()
|
||||||
l3pluginApi_cls.return_value = self.plugin_api
|
l3pluginApi_cls.return_value = self.plugin_api
|
||||||
|
|
||||||
def tearDown(self):
|
self.looping_call_p = mock.patch(
|
||||||
self.device_exists_p.stop()
|
'neutron.openstack.common.loopingcall.FixedIntervalLoopingCall')
|
||||||
self.l3pluginApi_cls_p.stop()
|
self.looping_call_p.start()
|
||||||
self.ip_cls_p.stop()
|
|
||||||
self.dvr_cls_p.stop()
|
self.addCleanup(mock.patch.stopall)
|
||||||
self.utils_exec_p.stop()
|
|
||||||
self.external_process_p.stop()
|
|
||||||
super(TestBasicRouterOperations, self).tearDown()
|
|
||||||
|
|
||||||
def testRouterInfoCreate(self):
|
def testRouterInfoCreate(self):
|
||||||
id = _uuid()
|
id = _uuid()
|
||||||
|
Loading…
Reference in New Issue
Block a user