From f45338de9b9d9c8ea0cd89e44fa9d8e91bbf7e29 Mon Sep 17 00:00:00 2001 From: Yoshiro Watanabe Date: Fri, 13 Sep 2024 10:51:32 +0000 Subject: [PATCH] Fix "test_timer" wait time Regarding the problem that the unit test "test_timer" sometimes causes an error, the wait time was revised because the wait time was short. Similarly, the wait time for the following test has been corrected. * test_timer_cancel Change-Id: Ic778fa13db8c62ea639a3f67841326786bc90b8d --- .../sol_refactored/conductor/test_prometheus_plugin.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tacker/tests/unit/sol_refactored/conductor/test_prometheus_plugin.py b/tacker/tests/unit/sol_refactored/conductor/test_prometheus_plugin.py index 7dae943e4..740788c37 100644 --- a/tacker/tests/unit/sol_refactored/conductor/test_prometheus_plugin.py +++ b/tacker/tests/unit/sol_refactored/conductor/test_prometheus_plugin.py @@ -173,8 +173,8 @@ class TestPrometheusPlugin(db_base.SqlTestCase): timer.add_vnfc_info_id('1') timer.add_vnfc_info_id('3') # Since the timeout period of `VnfmAutoHealTimer` is set to 1 second, - # it is also necessary to wait for 1 second before asserting. - time.sleep(1) + # it is also necessary to wait for 2 second before asserting. + time.sleep(2) self.assertEqual(self.timer_test[0], 'id') self.assertEqual(self.timer_test[1], ['1', '3']) @@ -184,8 +184,8 @@ class TestPrometheusPlugin(db_base.SqlTestCase): timer.add_vnfc_info_id('5') timer.cancel() # Since the timeout period of `VnfmAutoHealTimer` is set to 1 second, - # it is also necessary to wait for 1 second before asserting. - time.sleep(1) + # it is also necessary to wait for 2 second before asserting. + time.sleep(2) self.assertIsNone(self.timer_test[0]) self.assertIsNone(self.timer_test[1])