horizonzy commented on a change in pull request #11316:
URL: https://github.com/apache/pulsar/pull/11316#discussion_r670445600
##########
File path:
pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/TopicPoliciesTest.java
##########
@@ -2395,4 +2395,31 @@ public void
testTopicRetentionPolicySetInManagedLedgerConfig() throws Exception
});
}
+ @Test
+ public void testPolicyIsDeleteTogether() throws Exception {
+ final String topic = testTopic + UUID.randomUUID();
+ pulsarClient.newProducer().topic(topic).create().close();
+
+ Awaitility.await()
+ .until(() ->
pulsar.getTopicPoliciesService().cacheIsInitialized(TopicName.get(topic)));
+
assertNull(pulsar.getTopicPoliciesService().getTopicPolicies(TopicName.get(topic)));
+
+ int maxConsumersPerSubscription = 10;
+ admin.topics().setMaxConsumersPerSubscription(topic,
maxConsumersPerSubscription);
+
+ Awaitility.await().until(() ->
pulsar.getTopicPoliciesService().getTopicPolicies(TopicName.get(topic)) !=
null);
+
assertNotNull(pulsar.getTopicPoliciesService().getTopicPolicies(TopicName.get(topic)));
Review comment:
done.
##########
File path:
pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/TopicPoliciesTest.java
##########
@@ -2395,4 +2395,31 @@ public void
testTopicRetentionPolicySetInManagedLedgerConfig() throws Exception
});
}
+ @Test
+ public void testPolicyIsDeleteTogether() throws Exception {
Review comment:
done.
--
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]