]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/mgr/progress: fix timeout error when waiting for osd in event
authorRicardo Dias <rdias@suse.com>
Tue, 3 Sep 2019 10:44:05 +0000 (11:44 +0100)
committerKamoltat <ksirivad@redhat.com>
Tue, 6 Apr 2021 19:27:05 +0000 (19:27 +0000)
Fixes: https://tracker.ceph.com/issues/40618
Signed-off-by: Ricardo Dias <rdias@suse.com>
(cherry picked from commit b03537949abd8d453aa06c1580a4578868904bd1)

 Conflicts:
qa/tasks/mgr/test_progress.py - trivial fix

qa/tasks/mgr/test_progress.py

index 8c06dd0e0da3b84b74ac64adbc3686065c9e2b8c..4f76dbea3dc018f173982cda4e7c602cc84858a3 100644 (file)
@@ -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())