summaryrefslogtreecommitdiff
path: root/openstackclient/tests
diff options
context:
space:
mode:
authorDean Troyer <dtroyer@gmail.com>2019-09-09 10:54:34 -0500
committerDean Troyer <dtroyer@gmail.com>2019-09-10 14:09:29 -0500
commitde8ab5e8fd05c3942a8ec332c01f4c92213f52d4 (patch)
tree0c679ccb306917aebc085f9ea70e874c287567b9 /openstackclient/tests
parent678167a6bf42b63dadb08699e5fcf6cb6c8e04c7 (diff)
downloadpython-openstackclient-de8ab5e8fd05c3942a8ec332c01f4c92213f52d4.tar.gz
More aggregate functional race chasing
AggregateTests.wait_for_status() was a classmethod, those often are sources of conflict in parallel testing... Change-Id: I6211fd9c36926ca97de51a11923933d4d9d2dfda Signed-off-by: Dean Troyer <dtroyer@gmail.com>
Diffstat (limited to 'openstackclient/tests')
-rw-r--r--openstackclient/tests/functional/compute/v2/test_aggregate.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/openstackclient/tests/functional/compute/v2/test_aggregate.py b/openstackclient/tests/functional/compute/v2/test_aggregate.py
index 8a082e82..be318ae5 100644
--- a/openstackclient/tests/functional/compute/v2/test_aggregate.py
+++ b/openstackclient/tests/functional/compute/v2/test_aggregate.py
@@ -20,15 +20,14 @@ from openstackclient.tests.functional import base
class AggregateTests(base.TestCase):
"""Functional tests for aggregate"""
- @classmethod
- def wait_for_status(cls, check_type, check_name, desired_status,
+ def wait_for_status(self, check_type, check_name, desired_status,
wait=120, interval=5, failures=None):
current_status = "notset"
if failures is None:
failures = ['error']
total_sleep = 0
while total_sleep < wait:
- output = json.loads(cls.openstack(
+ output = json.loads(self.openstack(
check_type + ' show -f json ' + check_name))
current_status = output['name']
if (current_status == desired_status):
@@ -44,7 +43,7 @@ class AggregateTests(base.TestCase):
.format(current_status, check_type, check_name, failures))
time.sleep(interval)
total_sleep += interval
- cls.assertOutput(desired_status, current_status)
+ self.assertOutput(desired_status, current_status)
def test_aggregate_crud(self):
"""Test create, delete multiple"""
@@ -106,7 +105,6 @@ class AggregateTests(base.TestCase):
name1
)
self.assertOutput('', raw_output)
- self.wait_for_status('aggregate', name3, name3)
self.addCleanup(
self.openstack,
'aggregate delete ' + name3,