lifepuzzlefun commented on code in PR #19993: URL: https://github.com/apache/pulsar/pull/19993#discussion_r1191833952
########## pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerServiceTest.java: ########## @@ -1159,6 +1160,75 @@ public void testTopicLoadingOnDisableNamespaceBundle() throws Exception { } } + @Test + public void testConcurrentLoadTopicExceedLimitShouldNotBeAutoCreated() throws Exception { + boolean needDeleteTopic = false; + final String namespace = "prop/concurrentLoad"; + try { + // set up broker disable auto create and set concurrent load to 1 qps. + cleanup(); + conf.setMaxConcurrentTopicLoadRequest(1); + conf.setAllowAutoTopicCreation(false); + setup(); + + try { + admin.namespaces().createNamespace(namespace); + } catch (PulsarAdminException.ConflictException e) { + // Ok.. (if test fails intermittently and namespace is already created) + } + + // create 3 topic + + String topicName = "persistent://" + namespace + "/my-topic"; + + for (int i = 0; i < 3; i++) { + admin.topics().createNonPartitionedTopic(topicName + "_" + i); + } + + needDeleteTopic = true; + + + // try to load 10 topic + Review Comment: yeah, the empty line removed, please take a look again : -) -- 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: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org