Skip to content

Commit

Permalink
[improve][test] Reduce OneWayReplicatorUsingGlobalZKTest.testRemoveCl…
Browse files Browse the repository at this point in the history
…uster execution time (apache#23633)
  • Loading branch information
lhotari authored Nov 25, 2024
1 parent c6561e1 commit 2126d40
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,15 @@ 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(() -> {
Map<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 2126d40

Please sign in to comment.