Comment 5 for bug 1234857

Revision history for this message
Bhuvan Arumugam (bhuvan) wrote : Re: neutron unittest do not complete in OL6

ZhiQiang, with the following fix we don't face JSON serializable error. But the tests still hang. Discard my original comment about cast vs call. With the patch in https://bugs.launchpad.net/neutron/+bug/1234857/comments/3, the problem still occur.

Aaron, can you keep us posted on how your testing with OL6 go?

--- a/neutron/tests/unit/linuxbridge/test_lb_neutron_agent.py
+++ b/neutron/tests/unit/linuxbridge/test_lb_neutron_agent.py
@@ -97,9 +97,11 @@ class TestLinuxBridgeAgent(base.BaseTestCase):
         super(TestLinuxBridgeAgent, self).setUp()
         cfg.CONF.set_override('rpc_backend',
                               'neutron.openstack.common.rpc.impl_fake')
+ mock_specific = mock.MagicMock(local_ip=LOCAL_IP)
         self.lbmgr_patcher = mock.patch('neutron.plugins.linuxbridge.agent.'
                                         'linuxbridge_neutron_agent.'
- 'LinuxBridgeManager')
+ 'LinuxBridgeManager',
+ return_value=mock_specific)
         self.lbmgr_mock = self.lbmgr_patcher.start()
         self.addCleanup(self.lbmgr_patcher.stop)
         self.execute_p = mock.patch.object(ip_lib.IPWrapper, '_execute')