code: static void runChildWithRetry(Object runner, final FrameworkMethod method, RunNotifier notifier, int maxRetry) {
          boolean doRetry = false;
          Statement statement = invoke(runner, "methodBlock", method);
          Description description = invoke(runner, "describeChild", method);
          AtomicInteger count = new AtomicInteger(maxRetry);
          
          do {
              EachTestNotifier eachNotifier = new EachTestNotifier(notifier, description);
              
              eachNotifier.fireTestStarted();
              try {
                  statement.evaluate();
                  doRetry = false;
              } catch (AssumptionViolatedException thrown) {
                  doRetry = doRetry(method, thrown, count);
                  if (doRetry) {
                      description = RetriedTest.proxyFor(description, thrown);
                      eachNotifier.fireTestIgnored();
                  } else {
                      eachNotifier.addFailedAssumption(thrown);
                  }
              } catch (Throwable thrown) {
                  doRetry = doRetry(method, thrown, count);
                  if (doRetry) {
                      description = RetriedTest.proxyFor(description, thrown);
                      eachNotifier.fireTestIgnored();
                  } else {
                      eachNotifier.addFailure(thrown);
                  }
              } finally {
                  eachNotifier.fireTestFinished();
              }
          } while (doRetry);
      }
docs: Run the specified method, retrying on failure.
  
  @param runner JUnit test runner
  @param method test method to be run
  @param notifier run notifier through which events are published
  @param maxRetry maximum number of retry attempts