You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/03/21 12:55:19 UTC

[GitHub] [pulsar] codelipenghui commented on a change in pull request #14778: [fix][test] Fix wrong retry behavior in MetadataCacheTest

codelipenghui commented on a change in pull request #14778:
URL: https://github.com/apache/pulsar/pull/14778#discussion_r831071562



##########
File path: pulsar-metadata/src/test/java/org/apache/pulsar/metadata/MetadataCacheTest.java
##########
@@ -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)) {

Review comment:
       Interesting, not sure why adding `i == (retryCount - 1)` before
   




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org