← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1183602] Re: Colorizer throws exception on failed tests

 

** Changed in: nova
       Status: Fix Committed => Fix Released

** Changed in: nova
    Milestone: None => havana-2

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1183602

Title:
  Colorizer throws exception on failed tests

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  When running tests using run_tests.sh, if one of the tests fails I am
  seeing the following error:

  Traceback (most recent call last):
    File "tools/colorizer.py", line 329, in <module>
      if runner.run(test).wasSuccessful():
    File "/usr/lib/python2.7/unittest/runner.py", line 151, in run
      test(result)
    File "/opt/stack/nova/.venv/local/lib/python2.7/site-packages/subunit/__init__.py", line 1196, in __call__
      return self.run(result)
    File "/opt/stack/nova/.venv/local/lib/python2.7/site-packages/subunit/__init__.py", line 1204, in run
      protocol.lineReceived(line)
    File "/opt/stack/nova/.venv/local/lib/python2.7/site-packages/subunit/__init__.py", line 574, in lineReceived
      self._state.lineReceived(line)
    File "/opt/stack/nova/.venv/local/lib/python2.7/site-packages/subunit/__init__.py", line 411, in lineReceived
      self.details_parser.lineReceived(line)
    File "/opt/stack/nova/.venv/local/lib/python2.7/site-packages/subunit/details.py", line 119, in lineReceived
      self._parse_state(line)
    File "/opt/stack/nova/.venv/local/lib/python2.7/site-packages/subunit/details.py", line 84, in _look_for_content
      self._state.endDetails()
    File "/opt/stack/nova/.venv/local/lib/python2.7/site-packages/subunit/__init__.py", line 406, in endDetails
      self._report_outcome()
    File "/opt/stack/nova/.venv/local/lib/python2.7/site-packages/subunit/__init__.py", line 437, in _report_outcome
      details=self.details_parser.get_details())
    File "/opt/stack/nova/.venv/local/lib/python2.7/site-packages/testtools/testresult/real.py", line 1151, in addFailure
      return self.decorated.addFailure(test, err)
    File "tools/colorizer.py", line 236, in addFailure
      self._addResult(test, 'FAIL', 'red', 'F', False)
    File "tools/colorizer.py", line 205, in _addResult
      test_class, test_name = name.rsplit('.', 1)
  ValueError: need more than 1 value to unpack
  close failed in file object destructor:
  sys.excepthook is missing
  lost sys.stderr

  This makes it impossible to even tell which test failed.  I suspect it
  may be related to https://bugs.launchpad.net/nova/+bug/1168516 .  I
  made a change to colorizer.py which somewhat fixes the problem,
  although it still leaves a bogus process-returncode test in the
  output.  I'll go ahead and submit my change and maybe somebody who
  knows more about this than me can suggest a better fix.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1183602/+subscriptions