ceph/qa/tasks/thrasher.py
Nitzan Mordechai 3a7b0de9ec thrashers: standardize stop and join method names
Thrashers that do not inherit from ThrasherGreenlet previously used a
method called do_join, which combined stop and join functionality. To
ensure consistency and clarity, we want all thrashers to use separate
stop, join, and stop_and_join methods.

This commit renames methods and implements missing stop and stop_and_join
methods in thrashers that did not inherit from ThrasherGreenlet.

Fixes: https://tracker.ceph.com/issues/66698
Signed-off-by: Nitzan Mordechai <nmordech@redhat.com>
(cherry picked from commit a035b5a22f)
2025-02-03 10:34:08 +00:00

21 lines
391 B
Python

"""
Thrasher base class
"""
class Thrasher(object):
def __init__(self):
super(Thrasher, self).__init__()
self._exception = None
@property
def exception(self):
return self._exception
def set_thrasher_exception(self, e):
self._exception = e
def stop(self):
raise NotImplementedError("Subclasses didn't implement this method.")