diff --git a/neutron_lbaas/tests/tempest/v2/scenario/base.py b/neutron_lbaas/tests/tempest/v2/scenario/base.py index e7fe8b5c4..f6538c7f2 100644 --- a/neutron_lbaas/tests/tempest/v2/scenario/base.py +++ b/neutron_lbaas/tests/tempest/v2/scenario/base.py @@ -27,7 +27,6 @@ from six.moves.urllib import request as urllib2 from tempest.common import waiters from tempest import config -from tempest import exceptions from tempest.lib.common.utils import test_utils from tempest.lib import exceptions as lib_exc from tempest import test @@ -521,7 +520,7 @@ def try_connect(check_ip, port): if (time.time() - start) > timeout: message = ("Timed out trying to connect to {0}:{1} after " "{2} seconds".format(check_ip, port, timeout)) - raise exceptions.TimeoutException(message) + raise lib_exc.TimeoutException(message) def _send_requests(self, vip_ip, servers): counters = dict.fromkeys(servers, 0) diff --git a/neutron_lbaas/tests/tempest/v2/scenario/manager.py b/neutron_lbaas/tests/tempest/v2/scenario/manager.py index 09d5027bd..7b77e030b 100644 --- a/neutron_lbaas/tests/tempest/v2/scenario/manager.py +++ b/neutron_lbaas/tests/tempest/v2/scenario/manager.py @@ -556,7 +556,7 @@ def ping(): 'should_succeed': 'reachable' if should_succeed else 'unreachable' }) - result = test_utils.call_until_true(ping, timeout, 1) + result = tempest.test.call_until_true(ping, timeout, 1) LOG.debug('%(caller)s finishes ping %(ip)s in %(timeout)s sec and the ' 'ping result is %(result)s', { 'caller': caller, 'ip': ip_address, 'timeout': timeout, @@ -887,9 +887,9 @@ def refresh(): show_floatingip(floatingip_id)['floatingip']) return status == result['status'] - test_utils.call_until_true(refresh, - CONF.network.build_timeout, - CONF.network.build_interval) + tempest.test.call_until_true(refresh, + CONF.network.build_timeout, + CONF.network.build_interval) floating_ip = self.floating_ips_client.show_floatingip( floatingip_id)['floatingip'] self.assertEqual(status, floating_ip['status'], @@ -944,9 +944,9 @@ def ping_remote(): return not should_succeed return should_succeed - return test_utils.call_until_true(ping_remote, - CONF.validation.ping_timeout, - 1) + return tempest.test.call_until_true(ping_remote, + CONF.validation.ping_timeout, + 1) def _create_security_group(self, security_group_rules_client=None, tenant_id=None,