Nicira unit tests should not rely on 'fake API client' data
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
vmware-nsx |
New
|
Undecided
|
Unassigned |
Bug Description
Several Nicira unit tests verify the result of NVP operations leveraging data stored in the fake nvp api client.
Due to parallel testing, other threads might be operating on the same data structure, thus adding/removing data which might cause failures in unit tests asserting on the number of items in the dict.
Mitigation strategies include:
1 - avoid usage of these dicts at all, whenever possible.
2 - consider not using the fake api client at all, and mock nvplib calls instead
3 - always address peculiar elements in the dict, do not make assertions on the whole dictionary (such as len).
Long term strategy is to not use anymore the fake nvp api client, at least in the plugin tests.
nvplib calls might just be mocked, considering that nvplib unit tests are in place
(This is not in the scope of this bug report
Changed in neutron: | |
status: | New → Triaged |
no longer affects: | neutron |
Will probably convert in a blueprint for replacing the fake client with mock in test_nicira_plugin.
Expected target is I-1