Skip to content

Commit

Permalink
[fix][test] Fix wrong retry behavior in MetadataCacheTest (apache#14778)
Browse files Browse the repository at this point in the history
  • Loading branch information
Demogorgon314 authored Mar 21, 2022
1 parent 2b18fd3 commit f890017
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ public static void assertEqualsAndRetry(Supplier<Object> actual,
public static boolean retryStrategically(Predicate<Void> predicate, int retryCount, long intSleepTimeInMillis)
throws Exception {
for (int i = 0; i < retryCount; i++) {
if (predicate.test(null) || i == (retryCount - 1)) {
if (predicate.test(null)) {
return true;
}
Thread.sleep(intSleepTimeInMillis + (intSleepTimeInMillis * i));
Expand Down

0 comments on commit f890017

Please sign in to comment.