From 5f546d03ad96b84fbf71525d2534cf6aae5568ec Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Wed, 23 Sep 2020 14:50:56 -0700 Subject: [PATCH] Simplify default config test When run in parallel, there is a race condition in which the cleanup of the generated sample config file may happen while another unit test is trying to read from it, causing the test to fail[1]. Since both test_config_default and test_profiler_config_default are simply asserting properties of the default config file and not testing different corner cases, it's simplest to combine the two tests and not worry about when and how the sample file is cleaned up. [1] https://zuul.opendev.org/t/openstack/build/d870ff2db4b74c21a66b756f4377a0c4/artifacts Change-Id: If5de3b3499ea73c601e8793cba4fef3441d72f5d --- keystone/tests/unit/test_config.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/keystone/tests/unit/test_config.py b/keystone/tests/unit/test_config.py index 8b7d4646e1..634ccd9fe1 100644 --- a/keystone/tests/unit/test_config.py +++ b/keystone/tests/unit/test_config.py @@ -39,9 +39,7 @@ class ConfigTestCase(unit.TestCase): def test_config_default(self): self.assertIsNone(CONF.auth.password) self.assertIsNone(CONF.auth.token) - - def test_profiler_config_default(self): - """Check config.set_config_defaults() has set [profiler]enabled.""" + # Check config.set_config_defaults() has set [profiler]enabled. self.assertEqual(False, CONF.profiler.enabled)