heesung-sn commented on code in PR #19773:
URL: https://github.com/apache/pulsar/pull/19773#discussion_r1136528999


##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/extensions/ExtensibleLoadManagerImplTest.java:
##########
@@ -382,6 +378,56 @@ private void checkOwnershipState(String broker, 
NamespaceBundle bundle)
         assertFalse(otherLoadManager.checkOwnershipAsync(Optional.empty(), 
bundle).get());
     }
 
+    @Test(timeOut = 30 * 1000)
+    public void testSplitBundleAdminAPI() throws Exception {
+        String namespace = "public/default";
+        String topic = "persistent://" + namespace + "/test-split";
+        admin.topics().createPartitionedTopic(topic, 10);
+        BundlesData bundles = admin.namespaces().getBundles(namespace);
+        int numBundles = bundles.getNumBundles();
+
+        String firstBundle = bundles.getBoundaries().get(0) + "_" + 
bundles.getBoundaries().get(1);
+
+        admin.namespaces().splitNamespaceBundle(namespace, firstBundle, true, 
null);
+
+        assertEquals(admin.namespaces().getBundles(namespace).getNumBundles(), 
numBundles + 1);
+

Review Comment:
   Can we assert if the child bundle ranges exist too?



-- 
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: [email protected]

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

Reply via email to