/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.flink.testutils.junit.extensions.retry.strategy;

/** Retry strategy for executing retry tests. */
public interface RetryStrategy {
    /** Return the next attempt should execute or not. */
    boolean hasNextAttempt();

    /** Stop the following attempts when test succeed or failed. */
    void stopFollowingAttempts();

    /**
     * Handle the exception after the test execution.
     *
     * @param testName the test name
     * @param attemptIndex test attempt index that starts from 1
     * @param throwable the throwable that the test case throws
     */
    void handleException(String testName, int attemptIndex, Throwable throwable) throws Throwable;
}

@@ -1165,19 +1165,18 @@
  Handle 
-the
+an
  excepti
@@ -1182,32 +1182,128 @@
 ion 
-after the test execution
+that occurred during the annotated test attempt.%0A     *%0A     * %3Cp%3EThis method can swallow the exception to pass the test
 .%0A  
@@ -1473,16 +1473,374 @@
  throws%0A
+     * @throws org.opentest4j.TestAbortedException When handling a test attempt failure, throwing%0A     *     this exception indicates another attempt should be made.%0A     * @throws Throwable Propagating the original exception, or throwing any other exception%0A     *     indicates that the test has definitively failed and no further attempts should be made.%0A
      */%0A

Clarify javadoc exceptions