Skip to content

Commit

Permalink
[improve][test] Reduce OneWayReplicatorUsingGlobalZKTest.testRemoveCl…
Browse files Browse the repository at this point in the history
…uster execution time (#23633)

(cherry picked from commit 2126d40)
  • Loading branch information
lhotari committed Nov 27, 2024
1 parent 165ddb4 commit 7687326
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,16 @@ public void testRemoveCluster() throws Exception {
// The topics under the namespace of the cluster-1 will be deleted.
// Verify the result.
admin1.namespaces().setNamespaceReplicationClusters(ns1, new HashSet<>(Arrays.asList(cluster2)));
Awaitility.await().atMost(Duration.ofSeconds(120)).untilAsserted(() -> {
Awaitility.await().atMost(Duration.ofSeconds(60)).ignoreExceptions().untilAsserted(() -> {
ConcurrentOpenHashMap<String, CompletableFuture<Optional<Topic>>> tps
= pulsar1.getBrokerService().getTopics();
assertFalse(tps.containsKey(topic));
assertFalse(tps.containsKey(topicChangeEvents));
assertFalse(pulsar1.getNamespaceService().checkTopicExists(TopicName.get(topic)).join().isExists());
assertFalse(pulsar1.getNamespaceService().checkTopicExists(TopicName.get(topic))
.get(5, TimeUnit.SECONDS).isExists());
assertFalse(pulsar1.getNamespaceService()
.checkTopicExists(TopicName.get(topicChangeEvents)).join().isExists());
.checkTopicExists(TopicName.get(topicChangeEvents))
.get(5, TimeUnit.SECONDS).isExists());
});

// cleanup.
Expand Down

0 comments on commit 7687326

Please sign in to comment.