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
This commit is contained in:
Wim De Clercq 2017-01-05 16:01:27 +01:00 committed by Wim De Clercq
parent d8e3596259
commit 161e5809a6
1 changed files with 1 additions and 1 deletions

View File

@ -163,7 +163,7 @@ class RoutersTest(base_routers.BaseRouterTest):
intf = self.create_router_interface(router['id'], subnet['id'])
status_active = lambda: self.client.show_port(
intf['port_id'])['port']['status'] == 'ACTIVE'
utils.wait_until_true(status_active)
utils.wait_until_true(status_active, exception=AssertionError)
@test.idempotent_id('c86ac3a8-50bd-4b00-a6b8-62af84a0765c')
@test.requires_ext(extension='extraroute', service='network')