chia7712 commented on code in PR #19635:
URL: https://github.com/apache/kafka/pull/19635#discussion_r2073846645


##########
core/src/test/scala/integration/kafka/api/AuthorizerIntegrationTest.scala:
##########
@@ -924,6 +924,33 @@ class AuthorizerIntegrationTest extends 
AbstractAuthorizerIntegrationTest {
     sendRequests(requestKeyToRequest, false, topicNames)
   }
 
+  @Test
+  def 
testAuthorizationWithTopicNotExistingForProduceReqeustVersionLessThan13(): Unit 
= {
+    for (version <- ApiKeys.PRODUCE.oldestVersion to 12) {
+      val request = requests.ProduceRequest.builder(new ProduceRequestData()
+          .setTopicData(new ProduceRequestData.TopicProduceDataCollection(
+            util.List.of(new ProduceRequestData.TopicProduceData()
+                .setName(tp.topic())

Review Comment:
   We expect to return `TOPIC_AUTHORIZATION_FAILED` (if it failed to authorize) 
regardless of topic existence if the request is using topic name. Maybe we 
should test both cases - 1) topic exists and 2) topic does not exist (similar 
to `testAuthorizationFetchV12WithTopicNotExisting`)



-- 
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

Reply via email to