From: Kamoltat Date: Thu, 18 Mar 2021 19:51:34 +0000 (+0000) Subject: qa/tasks/mgr/test_progress.py: remove _osd_in_out_completed_events_count() X-Git-Tag: v15.2.13~2^2~2^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F40225%2Fhead;p=ceph.git qa/tasks/mgr/test_progress.py: remove _osd_in_out_completed_events_count() 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 --- diff --git a/qa/tasks/mgr/test_progress.py b/qa/tasks/mgr/test_progress.py index 9ba549e6b7e3e..eeca21de88f4e 100644 --- a/qa/tasks/mgr/test_progress.py +++ b/qa/tasks/mgr/test_progress.py @@ -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): """