From fe8c141b29e87ff19eee0ca3ec50cd60c40f4274 Mon Sep 17 00:00:00 2001 From: Ricardo Dias Date: Tue, 3 Sep 2019 11:44:05 +0100 Subject: [PATCH] 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 --- qa/tasks/mgr/test_progress.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/qa/tasks/mgr/test_progress.py b/qa/tasks/mgr/test_progress.py index 8c06dd0e0da..4f76dbea3dc 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()) -- 2.47.3