Skip to content

Commit

Permalink
Flaky-test: NamespacesTest.testSubscribeRate (#11394)
Browse files Browse the repository at this point in the history
Fix #11393 .

Documentation
This is a bug fix, no need to update doc
  • Loading branch information
Demogorgon314 committed Jul 22, 2021
1 parent 1fb5b47 commit 4f1bc77
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -39,6 +39,7 @@
import java.lang.reflect.Field;
import java.net.URI;
import java.net.URL;
import java.time.Duration;
import java.util.EnumSet;
import java.util.HashSet;
import java.util.List;
Expand Down Expand Up @@ -1249,9 +1250,10 @@ public void testSubscribeRate() throws Exception {
Awaitility.await().untilAsserted(() -> assertFalse(consumer.isConnected()));

// Out of limit period
Thread.sleep(6000L);
pulsarClient.updateServiceUrl(lookupUrl.toString());
assertTrue(consumer.isConnected());
Awaitility.await()
.pollDelay(Duration.ofSeconds(6))
.untilAsserted(() -> assertTrue(consumer.isConnected()));

// Disable Subscribe Rate Limiter
subscribeRate = new SubscribeRate(0, 10);
Expand Down

0 comments on commit 4f1bc77

Please sign in to comment.