summaryrefslogtreecommitdiff
path: root/nova/test.py
diff options
context:
space:
mode:
authorBrant Knudson <bknudson@us.ibm.com>2015-01-08 14:39:45 -0600
committerBrant Knudson <bknudson@us.ibm.com>2015-01-08 15:40:22 -0600
commitbcaff21f07763e9dbd859ea81f72cbca83a6e113 (patch)
tree53a103b4e2676b51321122ff0ba25f4161ffb865 /nova/test.py
parentf4c5ac770b4606bd8d6fca03f43d667f95880f27 (diff)
downloadnova-bcaff21f07763e9dbd859ea81f72cbca83a6e113.tar.gz
Move WarningsFixture after DatabaseFixture so emit once
The DatabaseFixture must be messing with the warnings module. Change-Id: Ic8b22569a4a8fb05b4d875e34432ada97a52f10c Partial-Bug: #1407736
Diffstat (limited to 'nova/test.py')
-rw-r--r--nova/test.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/nova/test.py b/nova/test.py
index b1cea61166..81c919ffc4 100644
--- a/nova/test.py
+++ b/nova/test.py
@@ -198,7 +198,6 @@ class TestCase(testtools.TestCase):
self.useFixture(nova_fixtures.OutputStreamCapture())
self.useFixture(nova_fixtures.StandardLogging())
- self.useFixture(nova_fixtures.WarningsFixture())
# NOTE(sdague): because of the way we were using the lock
# wrapper we eneded up with a lot of tests that started
@@ -224,6 +223,10 @@ class TestCase(testtools.TestCase):
if self.USES_DB:
self.useFixture(nova_fixtures.Database())
+ # NOTE(blk-u): WarningsFixture must be after the Database fixture
+ # because sqlalchemy-migrate messes with the warnings filters.
+ self.useFixture(nova_fixtures.WarningsFixture())
+
# NOTE(danms): Make sure to reset us back to non-remote objects
# for each test to avoid interactions. Also, backup the object
# registry.