Nicira unit tests should not rely on 'fake API client' data

Bug #1204686 reported by Salvatore Orlando
6
This bug affects 1 person
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
Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

Will probably convert in a blueprint for replacing the fake client with mock in test_nicira_plugin.
Expected target is I-1

Changed in neutron:
milestone: havana-3 → none
no longer affects: neutron
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.