Fix raising TimeoutException in tests

TimeoutException was imported from neutron_tempest_plugin.exceptions
module but there is no such class there.
This exception is defined in tempest.lib.exceptions module and
this patch changes to use it from there properly.

TrivialFix

Change-Id: If32d8414207cdb9dd8016e8bb1f8ff47164ca1e4
This commit is contained in:
Slawek Kaplonski 2018-10-04 14:31:19 +02:00
parent 71bda86402
commit 168e50108a
2 changed files with 2 additions and 4 deletions

View File

@ -21,6 +21,7 @@ from tempest.common import utils
from tempest.common import waiters
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
from tempest.lib import exceptions
import testscenarios
from testscenarios.scenarios import multiply_scenarios
@ -28,7 +29,6 @@ from neutron_tempest_plugin.api import base as base_api
from neutron_tempest_plugin.common import ssh
from neutron_tempest_plugin.common import utils as common_utils
from neutron_tempest_plugin import config
from neutron_tempest_plugin import exceptions
from neutron_tempest_plugin.scenario import base
from neutron_tempest_plugin.scenario import constants
from neutron_tempest_plugin.scenario import test_qos

View File

@ -17,8 +17,6 @@ from six.moves.urllib import parse as urlparse
from tempest.lib.common import rest_client as service_client
from tempest.lib import exceptions as lib_exc
from neutron_tempest_plugin import exceptions
class NetworkClientJSON(service_client.RestClient):
@ -280,7 +278,7 @@ class NetworkClientJSON(service_client.RestClient):
if self.is_resource_deleted(resource_type, id):
return
if int(time.time()) - start_time >= self.build_timeout:
raise exceptions.TimeoutException
raise lib_exc.TimeoutException
time.sleep(self.build_interval)
def is_resource_deleted(self, resource_type, id):