private void runWithRetries(TestInfo testInfo, String endpoint) throws Throwable {
        RestTest restTest = TestUtil.loadRestTest(testInfo.test.getValue(), getTestClass().getJavaClass().getClassLoader());
        int maxRetries = testInfo.test.getMaxRetries();
        int retryDelay = testInfo.test.getRetryDelay();
        Throwable exHolder = null;

        for (int tries = maxRetries; tries >= 0; tries--) {
            if (maxRetries > 0)  {
                log("[Tries remaining: {0}]", tries);
            }
            try {
                testInfo.plan.runner.runTest(restTest, endpoint);
                return;
            } catch (Throwable t) {
                log("Error occurred: {0}", t.getMessage());
                exHolder = t;
                if (retryDelay > 0) {
                    log("Waiting {0} ms before retrying...", retryDelay);
                    Thread.sleep(retryDelay);
                }
            }
        }
        if (exHolder != null) {
            throw exHolder;
        }
    }
@see org.junit.runners.ParentRunner#runChild(java.lang.Object, org.junit.runner.notification.RunNotifier)
manager/test/api/src/main/java/io/apiman/manager/test/junit/ManagerRestTester.java