File tree Expand file tree Collapse file tree
openstackclient/tests/functional/compute/v2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111# under the License.
1212
1313import json
14+ import time
1415import uuid
1516
1617from openstackclient .tests .functional import base
@@ -51,6 +52,23 @@ def test_aggregate_create_and_delete(self):
5152 cmd_output ['availability_zone' ]
5253 )
5354
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+
5472 del_output = self .openstack (
5573 'aggregate delete ' +
5674 name1 + ' ' +
You can’t perform that action at this time.
0 commit comments