From: Ricardo Dias Date: Tue, 3 Sep 2019 10:44:05 +0000 (+0100) Subject: qa/mgr/progress: fix timeout error when waiting for osd in event X-Git-Tag: v14.2.22~22^2~3^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fe8c141b29e87ff19eee0ca3ec50cd60c40f4274;p=ceph.git qa/mgr/progress: fix timeout error when waiting for osd in event Fixes: https://tracker.ceph.com/issues/40618 Signed-off-by: Ricardo Dias (cherry picked from commit b03537949abd8d453aa06c1580a4578868904bd1) Conflicts: qa/tasks/mgr/test_progress.py - trivial fix --- diff --git a/qa/tasks/mgr/test_progress.py b/qa/tasks/mgr/test_progress.py index 8c06dd0e0da3..4f76dbea3dc0 100644 --- a/qa/tasks/mgr/test_progress.py +++ b/qa/tasks/mgr/test_progress.py @@ -183,7 +183,7 @@ class TestProgress(MgrTestCase): # First Event should complete promptly self.wait_until_true(lambda: self._is_complete(initial_event['id']), timeout=self.EVENT_CREATION_PERIOD) - + try: # Wait for progress event marked in to pop up self.wait_until_equal(lambda: self._osd_in_out_events_count('in'), 1, @@ -274,10 +274,11 @@ class TestProgress(MgrTestCase): ev1 = self._simulate_failure() ev2 = self._simulate_back_in([0], ev1) - - # Wait for progress event to ultimately complete - self.wait_until_true(lambda: self._is_complete(ev2['id']), - timeout=self.RECOVERY_PERIOD) + + if ev2 is not None: + # Wait for progress event to ultimately complete + self.wait_until_true(lambda: self._is_complete(ev2['id']), + timeout=self.RECOVERY_PERIOD) self.assertTrue(self._is_quiet())