Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,14 @@ protected void cleanupPulsarResources() throws Exception {
if (!usingGlobalZK) {
admin2.namespaces().setNamespaceReplicationClusters(replicatedNamespace, Sets.newHashSet(cluster2), true);
}
admin1.namespaces().deleteNamespace(replicatedNamespace, true);
admin1.namespaces().deleteNamespace(nonReplicatedNamespace, true);
// When using global ZK, reducing replication clusters triggers async topic cleanup on removed clusters.
// Retry namespace deletion to handle topics that may be in a transitional state.
Awaitility.await().atMost(Duration.ofSeconds(30)).ignoreExceptions().untilAsserted(() -> {
admin1.namespaces().deleteNamespace(replicatedNamespace, true);
});
Awaitility.await().atMost(Duration.ofSeconds(30)).ignoreExceptions().untilAsserted(() -> {
admin1.namespaces().deleteNamespace(nonReplicatedNamespace, true);
});
if (!usingGlobalZK) {
admin2.namespaces().deleteNamespace(replicatedNamespace, true);
admin2.namespaces().deleteNamespace(nonReplicatedNamespace, true);
Expand Down
Loading