neutron unit tests never complete

asked 2013-09-27 23:01:04 -0600

bhuvan gravatar image

$ tox -e py26

When I run unit tests it hang forever and continue to run beyond 24hrs. The tests pass, but test suite never complete. The tests are quick until around 2000 tests. The test_basic tests seem to run forever. The testr logs for last 50 tests are here. It complain different error for each test, though it's passed: http://pastebin.com/djcGnpP3

This is the case even if we use py27 (tox -e py27). This is the case even if we run ./run_test.sh script manually. In both cases testr with venv is used.

However if I run test_basic tests separately, it is successful and completed within 2mins. testr list-tests | grep test_basic > test_basic ./run_tests.sh -P -V -- --load-list=basic-tests

Does anyone face this problem? Is it specific to running testr in parallel mode? Should I run testr in serial mode?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2013-10-03 16:57:03 -0600

bhuvan gravatar image

Everytime it hang, it spit the following error message. The tests PASS though.

Traceback (most recent call last): File "/home/jenkins/workspace/csi-neutron-upstream/neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py", line 759, in _report_state self.agent_state) File "/home/jenkins/workspace/csi-neutron-upstream/neutron/agent/rpc.py", line 74, in report_state return self.cast(context, msg, topic=self.topic) File "/home/jenkins/workspace/csi-neutron-upstream/neutron/openstack/common/rpc/proxy.py", line 171, in cast rpc.cast(context, self._get_topic(topic), msg) File "/home/jenkins/workspace/csi-neutron-upstream/neutron/openstack/common/rpc/__init__.py", line 158, in cast return _get_impl().cast(CONF, context, topic, msg) File "/home/jenkins/workspace/csi-neutron-upstream/neutron/openstack/common/rpc/impl_fake.py", line 166, in cast check_serialize(msg) File "/home/jenkins/workspace/csi-neutron-upstream/neutron/openstack/common/rpc/impl_fake.py", line 131, in check_serialize json.dumps(msg) File "/usr/lib64/python2.6/json/__init__.py", line 230, in dumps return _default_encoder.encode(obj) File "/usr/lib64/python2.6/json/encoder.py", line 367, in encode chunks = list(self.iterencode(o)) File "/usr/lib64/python2.6/json/encoder.py", line 309, in _iterencode for chunk in self._iterencode_dict(o, markers): File "/usr/lib64/python2.6/json/encoder.py", line 275, in _iterencode_dict for chunk in self._iterencode(value, markers): File "/usr/lib64/python2.6/json/encoder.py", line 309, in _iterencode for chunk in self._iterencode_dict(o, markers): File "/usr/lib64/python2.6/json/encoder.py", line 275, in _iterencode_dict for chunk in self._iterencode(value, markers): File "/usr/lib64/python2.6/json/encoder.py", line 309, in _iterencode for chunk in self._iterencode_dict(o, markers): File "/usr/lib64/python2.6/json/encoder.py", line 275, in _iterencode_dict for chunk in self._iterencode(value, markers): File "/usr/lib64/python2.6/json/encoder.py", line 309, in _iterencode for chunk in self._iterencode_dict(o, markers): File "/usr/lib64/python2.6/json/encoder.py", line 275, in _iterencode_dict for chunk in self._iterencode(value, markers): File "/usr/lib64/python2.6/json/encoder.py", line 309, in _iterencode for chunk in self._iterencode_dict(o, markers): File "/usr/lib64/python2.6/json/encoder.py", line 275, in _iterencode_dict for chunk in self._iterencode(value, markers): File "/usr/lib64/python2.6/json/encoder.py", line 317, in _iterencode for chunk in self._iterencode_default(o, markers): File "/usr/lib64/python2.6/json/encoder.py", line 323, in _iterencode_default newobj = self.default(o) File "/usr/lib64/python2.6/json/encoder.py", line 344, in default raise TypeError(repr(o) + " is not JSON serializable") TypeError: <magicmock name="LinuxBridgeManager().local_ip" id="666599248"> is not JSON serializable ERROR:neutron.plugins.linuxbridge.agent.linuxbridge_neutron_agent:Failed reporting state!

edit flag offensive delete link more
0

answered 2013-10-04 03:06:30 -0600

aji-zqfan gravatar image

there is a bug report https://bugs.launchpad.net/neutron/+bug/1232155 (https://bugs.launchpad.net/neutron/+b...)

if you're urgent to pass ut, i think you can add mock.patch for neutron.openstack.common.loopingcall.FixedIntervalLoopingCall in neutron/tests/unit/linuxbridge/test_lb_neutron_agent.py: class TestLinuxBridgeAgent.setUp

the root cause is TestLinuxBridgeAgent.test_update_devices_failed() create a LinuxBridgeNeutronAgentRPC agent but with LinuxBridgeManager mocked, the agent will report state periodically (because it is handled via FixedIntervalLoopingCall) with configuration, which needs LinuxBridgeManager.local_ip attr, as that object is mocked, json cannot serialize it

you can catch up with bug/1232155 for the real patch

good luck

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-09-27 23:01:04 -0600

Seen: 49 times

Last updated: Oct 04 '13