Use of parse.urlencode with dict in nova/tests/unit/scheduler/client/test_report.py can result in unpredictable query strings and thus unreliable tests
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
Chris Dent |
Bug Description
In nova/tests/
This results in a query string that will have an unpredictable order. Similarly, the code which is doing the actual query string creation is using the same form.
Most of the time the results are the same, and the tests pass, but sometimes they do not.
There are at least two potential ways to work around this:
* build the query strings using a sequence of tuples and set the 'doseq' param to urlencode to True. This will preserve order.
* Parse the expected_url's query params in the tests back to a dict and compare dicts
Changed in nova: | |
importance: | Low → High |
Fix proposed to branch: master /review. openstack. org/540420
Review: https:/