← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1654283] Re: test_router_interface_status raises troublesome error when it fails.

 

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

commit 161e5809a690d7c974a3a340b56273b8a66a6f16
Author: Wim De Clercq <Wim.De_Clercq@xxxxxxxxxxxxxxxxxx>
Date:   Thu Jan 5 16:01:27 2017 +0100

    Raise AssertionError instead of eventlet.timeout.Timeout when failing.
    
    The eventlet.timeout.Timeout exception subclasses Python's BaseException.
    This is problematic because that is a higher category exception than
    Python's Exception. As a result of this type of exception being raised
    during testing, this halts the normal test flow.
    AssertionError will properly mark a test as failed.
    
    Change-Id: Iaf74f877f6a70c0383d539e9b01d6db2ec0ddeca
    Closes-Bug: 1654283


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1654283

Title:
  test_router_interface_status raises troublesome error when it fails.

Status in neutron:
  Fix Released

Bug description:
  Test: neutron.tests.tempest.api.test_routers#test_router_interface_status
  This test waits for the router interface port to become active by using neutron.common.utils.wait_until_true.

  Problem is when it, for whatever reason, would not become active, this
  test raises an exception from eventlet.

  This particular error being raised by eventlet (eventlet.timeout.Timeout) isn't a subclass of the Python Exception, but is a subclass of BaseException
  And this causes the entire test cycle to hardstop. Even when there are still other tests left to run.

  
  Error Trace:

  Traceback (most recent call last):
    File "neutron/neutron/tests/tempest/api/test_routers.py", line 166, in test_router_interface_status
      utils.wait_until_true(status_active)
    File "neutron/neutron/common/utils.py", line 773, in wait_until_true
      eventlet.sleep(sleep)
    File "venvs/newton/local/lib/python2.7/site-packages/eventlet/greenthread.py", line 34, in sleep
      hub.switch()
    File "/newton/local/lib/python2.7/site-packages/eventlet/hubs/hub.py", line 294, in switch
      return self.greenlet.switch()
  eventlet.timeout.Timeout: 60 seconds

  2017-01-05 15:06:15.841 8835 CRITICAL tempest [-] Timeout: 60 seconds
  2017-01-05 15:06:15.841 8835 ERROR tempest Traceback (most recent call last):
  2017-01-05 15:06:15.841 8835 ERROR tempest   File "/usr/lib/pycharm-community/helpers/pycharm/utrunner.py", line 188, in <module>
  2017-01-05 15:06:15.841 8835 ERROR tempest     TeamcityTestRunner().run(all, **options)
  2017-01-05 15:06:15.841 8835 ERROR tempest   File "/usr/lib/pycharm-community/helpers/pycharm/tcunittest.py", line 262, in run
  2017-01-05 15:06:15.841 8835 ERROR tempest     test(result)
  2017-01-05 15:06:15.841 8835 ERROR tempest   File "/usr/lib/python2.7/unittest/suite.py", line 70, in __call__
  2017-01-05 15:06:15.841 8835 ERROR tempest     return self.run(*args, **kwds)
  2017-01-05 15:06:15.841 8835 ERROR tempest   File "/usr/lib/python2.7/unittest/suite.py", line 108, in run
  2017-01-05 15:06:15.841 8835 ERROR tempest     test(result)
  2017-01-05 15:06:15.841 8835 ERROR tempest   File "/venvs/newton/local/lib/python2.7/site-packages/unittest2/case.py", line 673, in __call__
  2017-01-05 15:06:15.841 8835 ERROR tempest     return self.run(*args, **kwds)
  2017-01-05 15:06:15.841 8835 ERROR tempest   File "/venvs/newton/local/lib/python2.7/site-packages/testtools/testcase.py", line 671, in run
  2017-01-05 15:06:15.841 8835 ERROR tempest     return run_test.run(result)
  2017-01-05 15:06:15.841 8835 ERROR tempest   File "/venvs/newton/local/lib/python2.7/site-packages/testtools/runtest.py", line 80, in run
  2017-01-05 15:06:15.841 8835 ERROR tempest     return self._run_one(actual_result)
  2017-01-05 15:06:15.841 8835 ERROR tempest   File "/venvs/newton/local/lib/python2.7/site-packages/testtools/runtest.py", line 94, in _run_one
  2017-01-05 15:06:15.841 8835 ERROR tempest     return self._run_prepared_result(ExtendedToOriginalDecorator(result))
  2017-01-05 15:06:15.841 8835 ERROR tempest   File "/venvs/newton/local/lib/python2.7/site-packages/testtools/runtest.py", line 119, in _run_prepared_result
  2017-01-05 15:06:15.841 8835 ERROR tempest     raise e
  2017-01-05 15:06:15.841 8835 ERROR tempest Timeout: 60 seconds
  2017-01-05 15:06:15.841 8835 ERROR tempest
  2017-01-05 15:06:15.843 8835 ERROR tempest.test [-] tearDownClass does not call the super's tearDownClass in these classes:
  set([<class 'neutron.tests.tempest.api.test_routers.RoutersTest'>])

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


References