315157973 commented on code in PR #15141:
URL: https://github.com/apache/pulsar/pull/15141#discussion_r964994695
##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApi2Test.java:
##########
@@ -2431,4 +2431,27 @@ public void
testPartitionedStatsAggregationByProducerNamePerPartition(String top
assertEquals(topicStats.getPublishers().size(), 2);
topicStats.getPublishers().forEach(p ->
assertTrue(p.isSupportsPartialProducer()));
}
+
+ @Test
+ public void testDeleteNamespaceWithDeletedPartitionedTopic() throws
Exception {
+ final String namespace = "prop-xyz/ns-delete";
+ admin.namespaces().createNamespace(namespace);
+ final String topicName = "persistent://" + namespace +
"/delete-ns-topic";
+ admin.topics().createPartitionedTopic(topicName, 10);
+ List<String> topics = pulsar.getPulsarResources().getTopicResources()
+ .listPersistentTopicsAsync(NamespaceName.get(namespace)).get();
+ topics.forEach(topic -> {
+ try {
+ admin.topics().delete(topic);
+ } catch (PulsarAdminException e) {
+ fail("should not fail to delete");
+ }
+ });
+ admin.namespaces().deleteNamespace(namespace);
+ try {
+ admin.namespaces().getPolicies(namespace);
Review Comment:
There must be an exception, so a `fail()` should be added here
--
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]