codelipenghui commented on a change in pull request #5784: Create load balance 
znode of broker when znode missed.
URL: https://github.com/apache/pulsar/pull/5784#discussion_r352972885
 
 

 ##########
 File path: 
pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/ModularLoadManagerImplTest.java
 ##########
 @@ -630,4 +630,14 @@ public void testOwnBrokerZnodeByMultipleBroker() throws 
Exception {
 
         pulsar.close();
     }
+
+    @Test
+    public void testZnodeMissed() throws Exception {
+        String path = LoadManager.LOADBALANCE_BROKERS_ROOT + "/" + 
pulsar1.getAdvertisedAddress() + ":" + 
pulsar1.getConfiguration().getWebServicePort().get();
+        ZkUtils.deleteFullPathOptimistic(pulsar1.getZkClient(), path, -1);
+        // Wait broker write load balance data to zookeeper, default interval 
is 5s.
+        Thread.sleep(6000);
 
 Review comment:
   Changed to manually trigger load manager to write load balance data to 
zookeeper

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to