The following warning appears in the unit test logs a number of times.
This patch fixes some of those warnings by mocking the get instance
calls higher up (Instance.get_by_uuid vs. db.instance_get_by_uuid).
"UserWarning: This test uses methods that set internal oslo_db
state, but it does not claim to use the database. This will conflict
with the setup of tests that do use the database and cause failures
later.
Note that this warning is only emitted once per unit test worker, so new
offenders will show up in the logs each time you fix a test until they
are all gone.
Reviewed: https:/ /review. openstack. org/303669 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=f64237d8905 6d75300aa9cafae d679b728407261
Committed: https:/
Submitter: Jenkins
Branch: master
commit f64237d89056d75 300aa9cafaed679 b728407261
Author: Diana Clarke <email address hidden>
Date: Fri Apr 8 20:55:59 2016 -0400
Fix database poison warnings
The following warning appears in the unit test logs a number of times. get_by_ uuid vs. db.instance_ get_by_ uuid).
This patch fixes some of those warnings by mocking the get instance
calls higher up (Instance.
state, but it does not claim to use the database. This will conflict
with the setup of tests that do use the database and cause failures
later.
Note that this warning is only emitted once per unit test worker, so new
offenders will show up in the logs each time you fix a test until they
are all gone.
Related-Bug: #1568414 22bba0be0c24882 330fb947af1
Change-Id: I76422d8c135593