diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/GetPartitionMetadataMultiBrokerTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/GetPartitionMetadataMultiBrokerTest.java index d1eeabdb3d7cc..1b4732f69d4d2 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/GetPartitionMetadataMultiBrokerTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/GetPartitionMetadataMultiBrokerTest.java @@ -253,6 +253,10 @@ public void testCompatibilityDifferentBrokersForNonPersistentTopic(boolean confi boolean isUsingHttpLookup) throws Exception { modifyTopicAutoCreation(configAllowAutoTopicCreation, TopicType.PARTITIONED, 3); + // Verify: the method "getPartitionsForTopic(topic, false, true)" will fallback + // to "getPartitionsForTopic(topic, true)" behavior. + int lookupPermitsBefore = getLookupRequestPermits(); + // Initialize the connections of internal Pulsar Client. PulsarClientImpl client1 = (PulsarClientImpl) pulsar1.getClient(); PulsarClientImpl client2 = (PulsarClientImpl) pulsar2.getClient(); @@ -270,9 +274,6 @@ public void testCompatibilityDifferentBrokersForNonPersistentTopic(boolean confi field.set(clientCnx, false); } } - // Verify: the method "getPartitionsForTopic(topic, false, true)" will fallback - // to "getPartitionsForTopic(topic, true)" behavior. - int lookupPermitsBefore = getLookupRequestPermits(); // Verify: we will not get an un-support error. PulsarClientImpl[] clientArray = getClientsToTest(isUsingHttpLookup);