heesung-sn commented on code in PR #19999:
URL: https://github.com/apache/pulsar/pull/19999#discussion_r1157505252
##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/extensions/ExtensibleLoadManagerImplTest.java:
##########
@@ -513,6 +515,35 @@ public Map<String, BrokerLookupData> filter(Map<String,
BrokerLookupData> broker
assertEquals(brokerLookupData.get().getWebServiceUrl(),
pulsar2.getWebServiceAddress());
}
+ @Test
+ public void testStartOldLoadManager() throws Exception {
+ ServiceConfiguration defaultConf = getDefaultConf();
+ defaultConf.setAllowAutoTopicCreation(true);
+ defaultConf.setForceDeleteNamespaceAllowed(true);
+
defaultConf.setLoadManagerClassName(ModularLoadManagerImpl.class.getName());
+ defaultConf.setLoadBalancerSheddingEnabled(false);
+ try (var additionalPulsarTestContext =
createAdditionalPulsarTestContext(defaultConf)) {
+ // start pulsar3 with old load manager
+ var pulsar3 = additionalPulsarTestContext.getPulsarService();
+
+ var availableBrokers =
pulsar3.getLoadManager().get().getAvailableBrokers();
+ assertEquals(availableBrokers.size(), 1);
+ assertEquals(availableBrokers.iterator().next(),
pulsar3.getLookupServiceAddress());
+ assertNotEquals(availableBrokers.iterator().next(),
pulsar1.getLookupServiceAddress());
+ assertNotEquals(availableBrokers.iterator().next(),
pulsar2.getLookupServiceAddress());
Review Comment:
nit: probably these asserts are not required? should we remove them?
--
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]