Skip to content

Commit

Permalink
[fix][test]: Flaky-test: GetPartitionMetadataMultiBrokerTest.testComp…
Browse files Browse the repository at this point in the history
…atibilityDifferentBrokersForNonPersistentTopic (#23666)

(cherry picked from commit 1cdb5db)
  • Loading branch information
visxu authored and lhotari committed Jan 3, 2025
1 parent 22e96f8 commit 8c4400f
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
Expand Down

0 comments on commit 8c4400f

Please sign in to comment.