From 2dfb0650d052b663c985e25b345a5047ed2cbcda Mon Sep 17 00:00:00 2001 From: Ilya Etingof Date: Fri, 8 Feb 2019 17:03:45 +0100 Subject: [PATCH] Make power sync unit test operational The ParallelPowerSyncTestCase did not inherit from unit test therefore never actually run. This patch fixes this problem. Change-Id: I8a6811485baa1219781b7083479af2d8811e4c67 --- ironic/tests/unit/conductor/test_manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ironic/tests/unit/conductor/test_manager.py b/ironic/tests/unit/conductor/test_manager.py index b5c1d2ee42..5d57f1cab5 100644 --- a/ironic/tests/unit/conductor/test_manager.py +++ b/ironic/tests/unit/conductor/test_manager.py @@ -7148,7 +7148,7 @@ class ManagerTestHardwareTypeProperties(mgr_utils.ServiceSetUpMixin, @mock.patch.object(waiters, 'wait_for_all') @mock.patch.object(manager.ConductorManager, '_spawn_worker') @mock.patch.object(manager.ConductorManager, '_sync_power_state_nodes_task') -class ParallelPowerSyncTestCase(mgr_utils.CommonMixIn): +class ParallelPowerSyncTestCase(mgr_utils.CommonMixIn, db_base.DbTestCase): def setUp(self): super(ParallelPowerSyncTestCase, self).setUp() @@ -7207,7 +7207,7 @@ class ParallelPowerSyncTestCase(mgr_utils.CommonMixIn): self.service._sync_power_states(self.context) self.assertEqual(0, spawn_mock.call_count) - self.assertEqual(9, sync_mock.call_count) + self.assertEqual(1, sync_mock.call_count) self.assertEqual(1, waiter_mock.call_count)