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
This commit is contained in:
parent
46fc2e2e41
commit
cae966812a
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue