From cb6a3843a795c414c4abed5caafe9bdbb235fbb2 Mon Sep 17 00:00:00 2001 From: Kamoltat Date: Mon, 8 Feb 2021 15:45:06 +0000 Subject: [PATCH] qa/tasks/mgr/test_progress: fix wait_until_equal Octopus ceph_test_case doesn't have period arg so remove that in wait_until_equal. Also increase time to wait for complete events by using RECOVERY_PERIOD instead of EVENT_CREATION_PERIOD Not needed in masters because only octopus and nautilus doesn't have a period argument in qa/tasks/mgr/test_progress.py wait_until_equals() function Fixes: https://tracker.ceph.com/issues/48824 Signed-off-by: Kamoltat (cherry picked from commit df41ea7467db3b40776030865896af0102129283) Conflicts: qa/tasks/mgr/test_progress.py - trivial fix --- qa/tasks/mgr/test_progress.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/qa/tasks/mgr/test_progress.py b/qa/tasks/mgr/test_progress.py index 4f76dbea3dc0..25a9f3764966 100644 --- a/qa/tasks/mgr/test_progress.py +++ b/qa/tasks/mgr/test_progress.py @@ -166,8 +166,7 @@ class TestProgress(MgrTestCase): # Wait for a progress event to pop up self.wait_until_equal(lambda: self._osd_in_out_events_count('out'), 1, - timeout=self.EVENT_CREATION_PERIOD*2, - period=1) + timeout=self.EVENT_CREATION_PERIOD*2) ev = self._get_osd_in_out_events('out')[0] log.info(json.dumps(ev, indent=1)) self.assertIn("Rebalancing after osd.0 marked out", ev['message']) @@ -182,13 +181,12 @@ class TestProgress(MgrTestCase): # First Event should complete promptly self.wait_until_true(lambda: self._is_complete(initial_event['id']), - timeout=self.EVENT_CREATION_PERIOD) + timeout=self.RECOVERY_PERIOD) try: # Wait for progress event marked in to pop up self.wait_until_equal(lambda: self._osd_in_out_events_count('in'), 1, - timeout=self.EVENT_CREATION_PERIOD*2, - period=1) + timeout=self.EVENT_CREATION_PERIOD*2) except RuntimeError as ex: if not "Timed out after" in str(ex): raise ex @@ -261,7 +259,7 @@ class TestProgress(MgrTestCase): # Event should complete promptly self.wait_until_true(lambda: self._is_complete(ev['id']), - timeout=self.EVENT_CREATION_PERIOD) + timeout=self.RECOVERY_PERIOD) self.assertTrue(self._is_quiet()) def test_osd_came_back(self): @@ -365,8 +363,8 @@ class TestProgress(MgrTestCase): 'osd', 'out', '0') # Wait for a progress event to pop up - self.wait_until_equal(lambda: len(self._all_events()), 1, - timeout=self.EVENT_CREATION_PERIOD*2) + self.wait_until_equal(lambda: self._osd_in_out_events_count('out'), 1, + timeout=self.RECOVERY_PERIOD) ev = self._all_events()[0] -- 2.47.3