Merge "Stop loading OVOServerRpcInterface in ML2 testcase" into stable/ocata

This commit is contained in:
Jenkins 2017-08-16 04:29:01 +00:00 committed by Gerrit Code Review
commit a1e522c9fa
2 changed files with 7 additions and 0 deletions

View File

@ -18,6 +18,7 @@ from neutron import context
from neutron.objects import network
from neutron.objects import securitygroup
from neutron.objects import subnet
from neutron.plugins.ml2 import ovo_rpc
from neutron.tests.unit.plugins.ml2 import test_plugin
@ -31,6 +32,9 @@ class OVOServerRpcInterfaceTestCase(test_plugin.Ml2PluginV2TestCase):
receive = lambda s, ctx, obs, evt: self.received.append((obs[0], evt))
mock.patch('neutron.api.rpc.handlers.resources_rpc.'
'ResourcesPushRpcApi.push', new=receive).start()
# base case blocks the handler
self.ovo_push_interface_p.stop()
self.plugin.ovo_notifier = ovo_rpc.OVOServerRpcInterface()
def _assert_object_received(self, ovotype, oid=None, event=None):
self.plugin.ovo_notifier.wait()

View File

@ -131,6 +131,9 @@ class Ml2PluginV2TestCase(test_plugin.NeutronDbPluginV2TestCase):
self.port_create_status = 'DOWN'
def setUp(self):
self.ovo_push_interface_p = mock.patch(
'neutron.plugins.ml2.ovo_rpc.OVOServerRpcInterface')
self.ovo_push_interface_p.start()
# Enable the test mechanism driver to ensure that
# we can successfully call through to all mechanism
# driver apis.