From f3f07f4401ff8be25598493c088e4e100b387fe4 Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Tue, 22 Jul 2014 13:40:33 -0700 Subject: [PATCH] Turn periodic tasks off in all unit tests We shouldn't rely on periodic tasks to randomly run in unit tests, instead if we need them to run we should explicitly call them out. Change-Id: I35850c47288e50d3146771dc7a9a54d62e36c3cf Related-Bug: 1311778 --- nova/test.py | 1 + nova/tests/integrated/integrated_helpers.py | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/test.py b/nova/test.py index 1698e250bb..8c0cfff266 100644 --- a/nova/test.py +++ b/nova/test.py @@ -325,6 +325,7 @@ class TestCase(testtools.TestCase): CONF.set_override('fatal_exception_format_errors', True) CONF.set_override('enabled', True, 'osapi_v3') CONF.set_override('force_dhcp_release', False) + CONF.set_override('periodic_enable', False) def _restore_obj_registry(self): objects_base.NovaObject._obj_classes = self._base_test_obj_backup diff --git a/nova/tests/integrated/integrated_helpers.py b/nova/tests/integrated/integrated_helpers.py index 62c36a0889..dc04dacc77 100644 --- a/nova/tests/integrated/integrated_helpers.py +++ b/nova/tests/integrated/integrated_helpers.py @@ -69,7 +69,6 @@ class _IntegratedTestBase(test.TestCase): f = self._get_flags() self.flags(**f) self.flags(verbose=True) - self.flags(periodic_enable=False) self.useFixture(test.ReplaceModule('crypto', fake_crypto)) nova.tests.image.fake.stub_out_image_service(self.stubs)