Technoboy- commented on code in PR #18369:
URL: https://github.com/apache/pulsar/pull/18369#discussion_r1016512239
##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/systopic/PartitionedSystemTopicTest.java:
##########
@@ -260,4 +265,61 @@ private void testSetBacklogCausedCreatingProducerFailure()
throws Exception {
Assert.fail("failed to create producer");
}
}
+
+ @Test
+ private void testSystemTopicNotCheckExceed() throws Exception {
+ final String ns = "prop/ns-test";
+ final String topic = ns + "/topic-1";
+
+ admin.namespaces().createNamespace(ns, 2);
+ admin.topics().createPartitionedTopic(String.format("persistent://%s",
topic), 1);
+
+ admin.topicPolicies().setMaxConsumers(topic, 1);
+ NamespaceEventsSystemTopicFactory systemTopicFactory = new
NamespaceEventsSystemTopicFactory(pulsarClient);
+ TopicPoliciesSystemTopicClient systemTopicClientForNamespace =
systemTopicFactory
+ .createTopicPoliciesSystemTopicClient(NamespaceName.get(ns));
+ SystemTopicClient.Reader reader1 =
systemTopicClientForNamespace.newReader();
+ SystemTopicClient.Reader reader2 =
systemTopicClientForNamespace.newReader();
+
+ admin.topicPolicies().setMaxProducers(topic, 1);
+ AtomicInteger successCount = new AtomicInteger(0);
+ CountDownLatch latch = new CountDownLatch(3);
+ new Thread(() -> {
Review Comment:
Ah, fixed. update test.
--
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]