code: static int getMaxRetry(Object runner, final FrameworkMethod method) {
          int maxRetry = 0;
          
          // determine if retry is disabled for this method
          NoRetry noRetryOnMethod = method.getAnnotation(NoRetry.class);
          // determine if retry is disabled for the class that declares this method
          NoRetry noRetryOnClass = method.getDeclaringClass().getAnnotation(NoRetry.class);
          
          // if method isn't ignored or excluded from retry attempts
          if (Boolean.FALSE.equals(invoke(runner, "isIgnored", method)) && (noRetryOnMethod == null) && (noRetryOnClass == null)) {
              // get configured maximum retry count
              maxRetry = JUnitConfig.getConfig().getInteger(JUnitSettings.MAX_RETRY.key(), Integer.valueOf(0));
          }
          
          return maxRetry;
      }
docs: Get the configured maximum retry count for failed tests ({@link JUnitSetting#MAX_RETRY MAX_RETRY}).
  <p>
  <b>NOTE</b>: If the specified method or the class that declares it are marked with the {@code @NoRetry}
  annotation, this method returns zero (0).
  
  @param runner JUnit test runner
  @param method test method for which retry is being considered
  @return maximum retry attempts that will be made if the specified method fails