private void runTestUnit(final Statement statement, final Description description, final RunNotifier notifier) {
    final EachTestNotifier eachNotifier = new EachTestNotifier(notifier, description);
    eachNotifier.fireTestStarted();
    try {
      statement.evaluate();
    } catch (AssumptionViolatedException e) {
      eachNotifier.addFailedAssumption(e);
    } catch (Throwable e) {
      retry(description, eachNotifier, statement, e);
    } finally {
      eachNotifier.fireTestFinished();
    }
  }
JUnit test runner that reruns test on failure.
common/src/test/org/apache/hive/common/util/RetryTestRunner.java