rondagostino commented on code in PR #13116: URL: https://github.com/apache/kafka/pull/13116#discussion_r1070162021
########## core/src/test/scala/unit/kafka/server/ControllerApisTest.scala: ########## @@ -523,8 +523,23 @@ class ControllerApisTest { new ListPartitionReassignmentsRequestData()).build()))) } - @Test - def testCreateTopics(): Unit = { + object AlwaysExceededControllerMutationQuota extends ControllerMutationQuota { + override def isExceeded: Boolean = true + override def record(permits: Double): Unit = throw new ThrottlingQuotaExceededException(throttleTime, "quota exceeded in test") + override def throttleTime: Int = 1000 + } + + @ParameterizedTest(name = "testCreateTopics with mutationQuotaExceeded: {0}, validateOnly: {1}") + @CsvSource(value = Array( + "no,no", + "no,yes", + "yes,no", + "yes,yes" + )) Review Comment: Instead of `yes/no` for the quota maybe this should be an int so that we can test that we are actually sending the correct partition count. We are requesting 6 potentially-valid partitions, so it might be good to ensure that a limit of 6 is throttled but a limit of 7 is not. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org