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:18:00 UTC

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

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


##########
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:
   That was left over from the previous solution and I forgot to delete it. Already deleted, Thanks



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