nodece commented on code in PR #17006:
URL: https://github.com/apache/pulsar/pull/17006#discussion_r941435814
##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApi2Test.java:
##########
@@ -2533,4 +2533,21 @@ public void testGetNamespaceTopicList() throws Exception
{
ListNamespaceTopicsOptions.builder().mode(Mode.NON_PERSISTENT).build());
Assert.assertTrue(notPersistentTopics.contains(nonPersistentTopic));
}
+
+ @Test
+ private void testTerminateSystemTopic() throws Exception {
+ final String topic =
"persistent://prop-xyz/ns1/testTerminateSystemTopic";
+ admin.topics().createNonPartitionedTopic(topic);
+ final String eventTopic = "persistent://prop-xyz/ns1/__change_events";
+ admin.topicPolicies().setMaxConsumers(topic, 2);
+ Awaitility.await().untilAsserted(() -> {
+ Assert.assertEquals(admin.topicPolicies().getMaxConsumers(topic),
Integer.valueOf(2));
+ });
+ try {
Review Comment:
```suggestion
PulsarAdminException ex = expectThrows(PulsarAdminException.class,
() -> admin.topics().terminateTopic(eventTopic));
assertTrue(ex instanceof PulsarAdminException.NotAllowedException);
```
--
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]