eolivelli commented on a change in pull request #9258:
URL: https://github.com/apache/pulsar/pull/9258#discussion_r561730217



##########
File path: 
pulsar-discovery-service/src/test/java/org/apache/pulsar/discovery/service/DiscoveryServiceTest.java
##########
@@ -90,9 +91,11 @@ private void clean() throws Exception {
     public void testBrokerDiscoveryRoundRobin() throws Exception {
         addBrokerToZk(5);
         String prevUrl = null;
+        BrokerDiscoveryProvider discoveryProvider = 
service.getDiscoveryProvider();
+        assertEquals(discoveryProvider.getAvailableBrokers().size(), 5);

Review comment:
       the wait is done inside addBrokerToZk (that is the actual fix)
   I added this line in order to double check in case of a new failure, 
   I can remove it, is is basically redundant

##########
File path: 
pulsar-discovery-service/src/test/java/org/apache/pulsar/discovery/service/DiscoveryServiceTest.java
##########
@@ -245,6 +248,9 @@ private void addBrokerToZk(int number) throws Exception {
         ZooKeeperChildrenCache availableBrokersCache = 
(ZooKeeperChildrenCache) field
                 .get(service.getDiscoveryProvider().localZkCache);
         availableBrokersCache.reloadCache(LOADBALANCE_BROKERS_ROOT);
+
+        Awaitility.await().atMost(10, TimeUnit.SECONDS).until(()

Review comment:
       okay, makes sense




----------------------------------------------------------------
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.

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


Reply via email to