Attempt to de-race qos policy

We're getting about 1-in-6 failures on qos policy delete now, with the message
that the policy is in use by a network.  It shouldn't be, this is possibly
due to the small window where the policy is set as the default.  Let's
remove that and shore up the test using --share instead.

Change-Id: I8d669bd3c5c88dadd2927aee89e5ef72cf4001c4
This commit is contained in:
Dean Troyer 2017-10-18 14:01:12 -05:00
parent 09faba2713
commit c901620a03
1 changed files with 7 additions and 3 deletions

View File

@ -66,7 +66,6 @@ class NetworkQosPolicyTests(common.NetworkTests):
self.openstack(
'network qos policy set ' +
'--share ' +
'--default ' +
policy_name
)
@ -75,11 +74,16 @@ class NetworkQosPolicyTests(common.NetworkTests):
policy_name
))
self.assertTrue(json_output['shared'])
self.assertTrue(json_output['is_default'])
self.openstack('network qos policy set --no-default ' + policy_name)
self.openstack(
'network qos policy set ' +
'--no-share ' +
'--no-default ' +
policy_name
)
json_output = json.loads(self.openstack(
'network qos policy show -f json ' +
policy_name
))
self.assertFalse(json_output['shared'])
self.assertFalse(json_output['is_default'])