docstr: Tests if the decorator correctly checks the list of messages
  provided for which you may suppress the error.
docstr_tok: ["Tests","if","the","decorator","correctly","checks","the","list","of","messages","provided","for","which","you","may","suppress","the","error","."]
code: def test_message_checking(self) -> None:
      """
      Tests if the decorator correctly checks the list of messages
      provided for which you may suppress the error.
      """
  
      # Also pass along the logger to ensure coverage
      logger = logging.getLogger("test_message_checking")
  
      class DecoratorTester:
          @retry_on_exception(
              default_return_on_suppression="SUCCESS",
              check_message_contains=["Hello", "World"],
              exception_types=(RuntimeError,),
              logger=logger,
              suppress_all_errors=True,
          )
          def error_throwing_function(self) -> None:
              # The exception thrown below should be caught and handled since it
              # has the keywords we want
              raise RuntimeError("Hello World")
  
      decorator_tester = DecoratorTester()
      self.assertEqual(
          "SUCCESS", decorator_tester.error_throwing_function()
      )
  
file_path: Ax/ax/utils/common/tests/test_executils.py
imports: import logging
  import time
  from asyncio import iscoroutinefunction
  from unittest.mock import Mock
  from ax.utils.common.executils import retry_on_exception
  from ax.utils.common.testutils import TestCase
label_desc: Use image node_id 3 for calling the TestRetryDecorator obj's underlying member method code with example usage: obj.test_message_checking() without return types