Comment 6 for bug 1234857

Revision history for this message
ZhiQiang Fan (aji-zqfan) wrote : Re: neutron unittest do not complete in OL6

i suggest you to try mocking the FixedIntervalLoopingCall, the hang may be caused by rpc (i'm not sure about it, i even cannot reproduce this issue in my env, [ubuntu 12.04 32bit, py2.7.5])

i read the test code in neutron/tests/unit/linuxbridge/test_lb_neutron_agent.py and neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py. as i said, the TestLinuxBridgeAgent.test_update_devices_failed() create an agent instantiates LinuxBridgeNeutronAgentRPC, eventhough it doesn't call daemon_loop but do setup_rpc, which is using FixedIntervalLoopingCall. that unit test doesn't clear the agent and let it run forever until sys.exit() (if i'm wrong, please correct me)

since i don't know how to clear this agent cleanly, the only way i can image is mock (and this is the usual way of other agents do, such as dhcp_agent, l3_agent, ovs agent)

(ps: the patch which set use_call=true will always use self.call for rpc, which i think can increase but not fix the hang problem)