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/09/06 12:13:00 UTC

[GitHub] [pulsar] gaoran10 commented on a diff in pull request #17487: [fix][flaky-test]NamespaceServiceTest.flaky/testModularLoadManagerRemoveBundleAndLoad

gaoran10 commented on code in PR #17487:
URL: https://github.com/apache/pulsar/pull/17487#discussion_r963625079


##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/namespace/NamespaceServiceTest.java:
##########
@@ -792,12 +794,46 @@ public void testModularLoadManagerRemoveBundleAndLoad() throws Exception {
         TimeUnit.SECONDS.sleep(5);
 
         // update broker bundle report to zk
-        loadManager.writeLoadReportOnZookeeper();
-        loadManager.writeResourceQuotasToZooKeeper();
+        waitResourceDataUpdateToZK(loadManager,
+                loadData -> !loadData.getBundleData().containsKey(bundleName));
 
         getResult = pulsar.getLocalMetadataStore().get(path).get();
         assertFalse(getResult.isPresent());
+    }
 
+    private void waitResourceDataUpdateToZK(
+            LoadManager loadManager, Predicate<LoadData> utilChecker) throws Exception {

Review Comment:
   It seems the param `utilChecker` is useless.



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