Ensure unit tests do not let looping calls roam freely
Bug 1220871 This patch does minimal changes in neutron.plugins.nicira.common.sync providing unit tests with a reference to the looping call object, so that they can control its lifecycle. Also, it perform a bit of refactoring in test_l3_agent.py in the way mocks are created and started. Change-Id: I73a1eb8ecdb7c6d46ff12afba549dd27095b7202
This commit is contained in:
parent
b35332c6b9
commit
226ca878d6
@ -75,6 +75,10 @@ class TestVPNAgent(base.BaseTestCase):
|
||||
self.plugin_api = mock.Mock()
|
||||
l3pluginApi_cls.return_value = self.plugin_api
|
||||
|
||||
looping_call_p = mock.patch(
|
||||
'neutron.openstack.common.loopingcall.FixedIntervalLoopingCall')
|
||||
looping_call_p.start()
|
||||
|
||||
self.fake_host = 'fake_host'
|
||||
self.agent = agent.VPNAgent(self.fake_host)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user