]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/mgr/test_progress.py: remove _osd_in_out_completed_events_count() 40225/head
authorKamoltat <ksirivad@redhat.com>
Thu, 18 Mar 2021 19:51:34 +0000 (19:51 +0000)
committerKamoltat <ksirivad@redhat.com>
Thu, 18 Mar 2021 20:06:45 +0000 (20:06 +0000)
delete the part where  _osd_in_out_completed_events_count()
was called in test_osd_cannot_recover() and revert to initial
state of the function since we don't need to use this function
in octopus. Also delete a duplicate of _osd_in_out_events_count().
This must be added by mistake in #39289 as well.

No need to fix for the backport in Nautilus: #38173
since the bugs are occured by adding additional code to
the cherry-pick specifically for Octopus.

fixes: https://tracker.ceph.com/issues/49891

Signed-off-by: Kamoltat <ksirivad@redhat.com>
qa/tasks/mgr/test_progress.py

index 9ba549e6b7e3ee543d298c502e9f541f3da52d1a..eeca21de88f4e7ed7b680fea6497fbdefa17af5b 100644 (file)
@@ -81,29 +81,6 @@ class TestProgress(MgrTestCase):
         else:
             return marked_out_events
 
-    def _osd_in_out_events_count(self, marked='both'):
-        """
-        Return the event that deals with OSDs being
-        marked in, out or both
-        """
-
-        marked_in_events = []
-        marked_out_events = []
-
-        events_in_progress = self._events_in_progress()
-        for ev in events_in_progress:
-            if self.is_osd_marked_out(ev):
-                marked_out_events.append(ev)
-            elif self.is_osd_marked_in(ev):
-                marked_in_events.append(ev)
-
-        if marked == 'both':
-            return [marked_in_events] + [marked_out_events]
-        elif marked == 'in':
-            return marked_in_events
-        else:
-            return marked_out_events
-
     def _osd_in_out_events_count(self, marked='both'):
         """
         Count the number of on going recovery events that deals with
@@ -350,9 +327,7 @@ class TestProgress(MgrTestCase):
         # Check that no event is created
         time.sleep(self.EVENT_CREATION_PERIOD)
 
-        self.assertEqual(
-            self._osd_in_out_completed_events_count('out'),
-            osd_count - pool_size)
+        self.assertEqual(len(self._all_events()), osd_count - pool_size)
 
     def test_turn_off_module(self):
         """