Do not assume order of pci slot list
This fixes the neutron.tests.unit.sriovnicagent.test_eswitch_manager .TestEmbSwitch.test_get_pci_list unit test that breaks with a randomized PYTHONHASHSEED (see the bug report). The test assumed that the pci slot list was sorted, so sort the result before comparing. Note: There are several other unrelated unit tests that also break with a randomized PYTHONHASHSEED, but they are not addressed here. They will be addressed in separate patches. Change-Id: Ia2d879cc1251fb9cf9b653a41064e902b30005af Partial-bug: #1348818
This commit is contained in:
parent
0e6864b3f4
commit
7a11669680
@ -280,7 +280,8 @@ class TestEmbSwitch(base.BaseTestCase):
|
||||
|
||||
def test_get_pci_list(self):
|
||||
result = self.emb_switch.get_pci_slot_list()
|
||||
self.assertEqual([tup[0] for tup in self.SCANNED_DEVICES], result)
|
||||
self.assertEqual([tup[0] for tup in self.SCANNED_DEVICES],
|
||||
sorted(result))
|
||||
|
||||
|
||||
class TestPciOsWrapper(base.BaseTestCase):
|
||||
|
Loading…
x
Reference in New Issue
Block a user