Skip to content

Commit

Permalink
[fix][test] Fix flaky GetPartitionMetadataMultiBrokerTest.testCompati…
Browse files Browse the repository at this point in the history
…bilityDifferentBrokersForNonPersistentTopic (apache#23259)

(cherry picked from commit c891eaa)
(cherry picked from commit cddb3ac)
  • Loading branch information
hanmz authored and srinath-ctds committed Oct 16, 2024
1 parent e5de505 commit a5cae64
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,8 @@ public void testCompatibilityDifferentBrokersForNonPersistentTopic(boolean confi
// Initialize the connections of internal Pulsar Client.
PulsarClientImpl client1 = (PulsarClientImpl) pulsar1.getClient();
PulsarClientImpl client2 = (PulsarClientImpl) pulsar2.getClient();
client1.getLookup(pulsar2.getBrokerServiceUrl()).getBroker(TopicName.get(DEFAULT_NS + "/tp1"));
client2.getLookup(pulsar1.getBrokerServiceUrl()).getBroker(TopicName.get(DEFAULT_NS + "/tp1"));
client1.getLookup(pulsar2.getBrokerServiceUrl()).getBroker(TopicName.get(DEFAULT_NS + "/tp1")).join();
client2.getLookup(pulsar1.getBrokerServiceUrl()).getBroker(TopicName.get(DEFAULT_NS + "/tp1")).join();

// Inject a not support flag into the connections initialized.
Field field = ClientCnx.class.getDeclaredField("supportsGetPartitionedMetadataWithoutAutoCreation");
Expand Down

0 comments on commit a5cae64

Please sign in to comment.