RyanSkraba commented on code in PR #20805:
URL: https://github.com/apache/flink/pull/20805#discussion_r984596066


##########
flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/testutils/junit/extensions/retry/strategy/RetryOnExceptionStrategy.java:
##########
@@ -37,6 +40,12 @@ public RetryOnExceptionStrategy(
     @Override
     public void handleException(String testName, int attemptIndex, Throwable 
throwable)
             throws Throwable {
+        // Failed when reach the total retry times
+        if (attemptIndex >= totalTimes) {
+            LOG.error("Test Failed at the last retry.", throwable);
+            throw throwable;
+        }

Review Comment:
   Hello!  I thought about this too -- the way the code is expressed, there 
could be other implementations of `AbstractRetryStrategy` that apply different 
strategies (for example, to continue retrying for max period of time regardless 
of the number of attempts).
   
   My opinion isn't strong on this, but the logic isn't really complicated 
enough to need to be abstracted away.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to