summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--openstackclient/tests/functional/compute/v2/test_aggregate.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/openstackclient/tests/functional/compute/v2/test_aggregate.py b/openstackclient/tests/functional/compute/v2/test_aggregate.py
index cf9d2bc..7102675 100644
--- a/openstackclient/tests/functional/compute/v2/test_aggregate.py
+++ b/openstackclient/tests/functional/compute/v2/test_aggregate.py
@@ -11,6 +11,7 @@
11# under the License. 11# under the License.
12 12
13import json 13import json
14import time
14import uuid 15import uuid
15 16
16from openstackclient.tests.functional import base 17from openstackclient.tests.functional import base
@@ -51,6 +52,23 @@ class AggregateTests(base.TestCase):
51 cmd_output['availability_zone'] 52 cmd_output['availability_zone']
52 ) 53 )
53 54
55 # Loop a few times since this is timing-sensitive
56 # Just hard-code it for now, since there is no pause and it is
57 # racy we shouldn't have to wait too long, a minute seems reasonable
58 wait_time = 0
59 while wait_time < 60:
60 cmd_output = json.loads(self.openstack(
61 'aggregate show -f json ' +
62 name2
63 ))
64 if cmd_output['name'] != name2:
65 # Hang out for a bit and try again
66 print('retrying aggregate check')
67 wait_time += 10
68 time.sleep(10)
69 else:
70 break
71
54 del_output = self.openstack( 72 del_output = self.openstack(
55 'aggregate delete ' + 73 'aggregate delete ' +
56 name1 + ' ' + 74 name1 + ' ' +