Merge "Replace assertItemsEqual with assertCountEqual"

This commit is contained in:
Zuul 2022-05-11 02:44:37 +00:00 committed by Gerrit Code Review
commit bd63eea1ee
2 changed files with 6 additions and 6 deletions

View File

@ -934,7 +934,7 @@ class NUMACPUDedicatedLiveMigrationTest(NUMALiveMigrationBase):
(host_sm_a, host_sm_b)):
cpu_shared_set = host_sm.get_cpu_shared_set()
server_shared_cpus = self._get_shared_cpuset(server['id'])
self.assertItemsEqual(
self.assertCountEqual(
server_shared_cpus, cpu_shared_set, 'Shared CPU Set %s of '
'shared server %s is not equal to shared set of %s' %
(server_shared_cpus, server['id'], cpu_shared_set))
@ -951,7 +951,7 @@ class NUMACPUDedicatedLiveMigrationTest(NUMALiveMigrationBase):
# Nova bug 1869804 has been addressed
shared_set_a = self._get_shared_cpuset(shared_server_a['id'])
host_a_shared_set = host_sm_a.get_cpu_shared_set()
self.assertItemsEqual(
self.assertCountEqual(
shared_set_a, host_a_shared_set, 'After migration of server %s, '
'shared CPU set %s is not equal to new shared set %s' %
(shared_server_a['id'], shared_set_a, host_a_shared_set))
@ -1045,7 +1045,7 @@ class MixedCPUPolicyTest(BasePinningTest, numa_helper.NUMAHelperMixin):
# Validate the PCPUs mapped to core 0 are a subset of the cpu shared
# set of the host
self.assertItemsEqual(guest_shared_cpus, host_shared_cpus,
self.assertCountEqual(guest_shared_cpus, host_shared_cpus,
'Shared CPU Set %s of shared server %s is '
'not equal to shared set of host %s' %
(guest_shared_cpus, server['id'],

View File

@ -155,7 +155,7 @@ class VirtioSCSIDisk(base.BaseWhiteboxComputeTest):
attached_serial_ids = self.get_attached_serial_ids(scsi_disks)
# Assert that the attached volume ids are present as serials
self.assertItemsEqual(attached_volume_ids, attached_serial_ids)
self.assertCountEqual(attached_volume_ids, attached_serial_ids)
@testtools.skipUnless(CONF.whitebox.available_cinder_storage >
(CONF.whitebox.flavor_volume_size + disks_to_create),
@ -200,7 +200,7 @@ class VirtioSCSIDisk(base.BaseWhiteboxComputeTest):
attached_serial_ids = self.get_attached_serial_ids(scsi_disks)
# Assert that the volumes IDs we attached are listed as attached
self.assertItemsEqual(vol_ids, attached_volume_ids)
self.assertCountEqual(vol_ids, attached_volume_ids)
# Assert that the volume IDs we attached are present in the serials
self.assertItemsEqual(vol_ids, attached_serial_ids)
self.assertCountEqual(vol_ids, attached_serial_ids)