RyanSkraba commented on code in PR #20805:
URL: https://github.com/apache/flink/pull/20805#discussion_r997103649
##########
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:
I gave your suggestion a try, but creating and delegating to a new method in
the abstract strategy takes more code and makes the final implementation
non-obvious.
It might have been a bit premature to have introduced the strategy pattern
with only two alternatives, but I'm not too worried about repeating this pretty
simple if explicitly! Do you have a strong opinion about this?
--
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]