From fe526af5172d35872df2f8e38314ee69dbb0416e Mon Sep 17 00:00:00 2001 From: Wim De Clercq Date: Thu, 5 Jan 2017 16:01:27 +0100 Subject: [PATCH] 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 (cherry picked from commit 161e5809a690d7c974a3a340b56273b8a66a6f16) --- neutron/tests/tempest/api/test_routers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neutron/tests/tempest/api/test_routers.py b/neutron/tests/tempest/api/test_routers.py index 20e54cf54fc..d98ea3acae0 100644 --- a/neutron/tests/tempest/api/test_routers.py +++ b/neutron/tests/tempest/api/test_routers.py @@ -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')