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
This commit is contained in:
parent
ed06934be8
commit
f45338de9b
@ -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])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user