Big Switch unit tests leave exceptions in subunit log

Bug #1370898 reported by Kevin Benton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Kevin Benton

Bug Description

The Big Switch capabilities check code throws an exception during the unit tests because a magicmock is passed into json.loads. This doesn't affect the unit tests but it leaves stack traces in the test log that take up unnecessary space.

ties. Newer API calls won't be supported.
Traceback (most recent call last):
  File "neutron/plugins/bigswitch/servermanager.py", line 116, in get_capabilities
    self.capabilities = jsonutils.loads(body)
  File "neutron/openstack/common/jsonutils.py", line 172, in loads
    return json.loads(strutils.safe_decode(s, encoding), **kwargs)
  File "/usr/lib/python2.7/json/__init__.py", line 326, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
    obj, end = self.scan_once(s, idx)
ValueError: Expecting property name: line 1 column 1 (char 1)
2014-09-17 01:11:55,083 INFO [neutron.plugins.bigswitch.servermanager] The following capabilities were received for localhost: []
2014-09-17 01:11:55,083 ERROR [neutron.plugins.bigswitch.servermanager] Couldn't retrieve capabilities. Newer API calls won't be supported.
Traceback (most recent call last):
  File "neutron/plugins/bigswitch/servermanager.py", line 116, in get_capabilities
    self.capabilities = jsonutils.loads(body)
  File "neutron/openstack/common/jsonutils.py", line 172, in loads
    return json.loads(strutils.safe_decode(s, encoding), **kwargs)
  File "/usr/lib/python2.7/json/__init__.py", line 326, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
    obj, end = self.scan_once(s, idx)
ValueError: Expecting property name: line 1 column 1 (char 1)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/122336

Changed in neutron:
assignee: nobody → Kevin Benton (kevinbenton)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/122336
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=d675168a2ee8d968f7177ec31969e9db8d6bffab
Submitter: Jenkins
Branch: master

commit d675168a2ee8d968f7177ec31969e9db8d6bffab
Author: Kevin Benton <email address hidden>
Date: Wed Sep 17 01:36:03 2014 -0700

    Stop exception log in Big Switch unit tests

    Reduce unit test log sizes by removing stack trace
    exception logging in Big Switch unit tests.

    Closes-Bug: #1370898
    Change-Id: Id808edb5db567db31b6c1366e20948683f20118a

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: kilo-1 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.