summaryrefslogtreecommitdiff
path: root/openstackclient/tests/functional/network
diff options
context:
space:
mode:
authorDean Troyer <dtroyer@gmail.com>2017-10-18 14:01:12 -0500
committerDean Troyer <dtroyer@gmail.com>2017-10-18 14:03:51 -0500
commitc901620a036c31d71b2108c51431d53a9eb0dad9 (patch)
tree8b0e85fff56d9f1ca872b6d00f5bc50e914163d8 /openstackclient/tests/functional/network
parent09faba27133f4b96085ed8596fa199200ed015aa (diff)
downloadpython-openstackclient-c901620a036c31d71b2108c51431d53a9eb0dad9.tar.gz
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
Diffstat (limited to 'openstackclient/tests/functional/network')
-rw-r--r--openstackclient/tests/functional/network/v2/test_network_qos_policy.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/openstackclient/tests/functional/network/v2/test_network_qos_policy.py b/openstackclient/tests/functional/network/v2/test_network_qos_policy.py
index fc36f490..02e64028 100644
--- a/openstackclient/tests/functional/network/v2/test_network_qos_policy.py
+++ b/openstackclient/tests/functional/network/v2/test_network_qos_policy.py
@@ -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'])