From cae966812a4a5070c3e7f82d16ebe697da57e5c5 Mon Sep 17 00:00:00 2001 From: melanie witt Date: Sat, 29 Jan 2022 01:13:17 +0000 Subject: [PATCH] Append random int to new flavor name in QoSBandwidthAndPacketRateTests In a couple of the tests a new flavor is created by appending the string 'extra' to the existing flavor name. The existing flavor name is however CONF.compute.flavor_ref, which isn't unique. If two tests that create the flavor run at the same time, there will be a 409 collision and one test will fail. This appends a random int to the new flavor name to prevent conflicts. Closes-Bug: #1959467 Change-Id: I9928e2be9c749f69eea9a9d4f9e8fe03ef4ef612 --- tempest/scenario/test_network_qos_placement.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tempest/scenario/test_network_qos_placement.py b/tempest/scenario/test_network_qos_placement.py index adb0ee3c29..cdc25dd87c 100644 --- a/tempest/scenario/test_network_qos_placement.py +++ b/tempest/scenario/test_network_qos_placement.py @@ -79,7 +79,7 @@ class NetworkQoSPlacementTestBase(manager.NetworkScenarioTest): new_flavor = self.flavors_client.create_flavor(**{ 'ram': old_flavor['ram'], 'vcpus': old_flavor['vcpus'], - 'name': old_flavor['name'] + 'extra', + 'name': old_flavor['name'] + 'extra-' + data_utils.rand_int_id(), 'disk': old_flavor['disk'] + 1 })['flavor'] self.addCleanup(test_utils.call_and_ignore_notfound_exc,