Devstack tests fail from time to time
Bug #1435180 reported by
Julien Danjou
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Gnocchi |
Fix Released
|
Medium
|
Chris Dent |
Bug Description
Changed in gnocchi: | |
status: | New → Triaged |
importance: | Undecided → Critical |
importance: | Critical → Medium |
Changed in gnocchi: | |
milestone: | none → 1.0.0rc1 |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
This is happening because the devstack plugin.sh creates archive policies and add some meters here:
https:/ /github. com/stackforge/ gnocchi/ blob/master/ devstack/ plugin. sh#L293
Then the functional jobs go on to run the gabbi tests against the live gnocchi server, using the database that plugin.sh gave data to.
This leads to the gabbi tests (which were written to use a different database per file) having a different starting point than what they were expecting.
In the specific case of the tests I've seen, the problem is that a test which is using the first result in a list to generate a comparison and then a subsequent request. In the original testing situation there was only one result. When in the functional context there is at least two and the ordering is not predictable.
One possible fix is to get rid of (or make optional) the sample data created in plugin.sh. It would be possible to make the gabbi tests robust in this context if we use known ids or other ways of filtering in the tests but that will make them a bit more noisy and will make it harder to keep the tests consistent.
In fact, once there are several yaml files, it may get quite hard to guarantee the datasets in the functional context.
The underlying problem here is in the gabbi config fixture. It uses a different storage engine per file, but the same indexer. I'll explore changing that.