From 0f5edd663e47955f1a1eba17f55dc778b3879178 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Thu, 22 Sep 2016 14:01:40 -0400 Subject: [PATCH] Fix stdout leakage during opportunistic db tests The oslo_db base class does not handle proper logging capture. This inserts the correct capture before we setup those classes to prevent leakage into the raw stdout stream which makes it confusing to read test results. Change-Id: If44c399e29373d2ef6bce6e1df5f96ed2caab462 --- nova/tests/unit/db/test_db_api.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nova/tests/unit/db/test_db_api.py b/nova/tests/unit/db/test_db_api.py index a4483c4c9c..415de8a9a5 100644 --- a/nova/tests/unit/db/test_db_api.py +++ b/nova/tests/unit/db/test_db_api.py @@ -64,6 +64,7 @@ from nova import objects from nova.objects import fields from nova import quota from nova import test +from nova.tests import fixtures as nova_fixtures from nova.tests.unit import fake_console_auth_token from nova.tests.unit import matchers from nova.tests import uuidsentinel @@ -9753,6 +9754,12 @@ class RetryOnDeadlockTestCase(test.TestCase): class TestSqlalchemyTypesRepr(test_base.DbTestCase): def setUp(self): + # NOTE(sdague): the oslo_db base test case completely + # invalidates our logging setup, we actually have to do that + # before it is called to keep this from vomitting all over our + # test output. + self.useFixture(nova_fixtures.StandardLogging()) + super(TestSqlalchemyTypesRepr, self).setUp() meta = MetaData(bind=self.engine) self.table = Table(