gaoran10 commented on code in PR #18804:
URL: https://github.com/apache/pulsar/pull/18804#discussion_r1043095326
##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApi2Test.java:
##########
@@ -1648,6 +1648,11 @@ public void testDeleteNamespaceWithTopicPolicies()
throws Exception {
// create namespace2
String namespace = tenant + "/test-ns2";
+ admin.namespaces().createNamespace(namespace, Set.of("test"));
+ admin.topics().createNonPartitionedTopic(namespace + "/tobedeleted");
+ // verify namespace can be deleted even without topic policy events
Review Comment:
I'm not sure why the namespace couldn't be deleted when there is no topic
policy events.
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/SystemTopicBasedTopicPoliciesService.java:
##########
@@ -106,6 +109,19 @@ private CompletableFuture<Void>
sendTopicPolicyEvent(TopicName topicName, Action
new BrokerServiceException.NotAllowedException("Not
allowed to send event to health check topic"));
}
CompletableFuture<Void> result = new CompletableFuture<>();
+ try {
+ final Optional<Policies> namespacePolicies =
pulsarService.getPulsarResources().getNamespaceResources()
Review Comment:
Could you use the asynchronous method?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]