junrao commented on code in PR #15968: URL: https://github.com/apache/kafka/pull/15968#discussion_r2045121056
########## core/src/test/scala/integration/kafka/api/AuthorizerIntegrationTest.scala: ########## @@ -94,9 +94,14 @@ class AuthorizerIntegrationTest extends AbstractAuthorizerIntegrationTest { val requestKeyToError = (topicNames: Map[Uuid, String], version: Short) => Map[ApiKeys, Nothing => Errors]( ApiKeys.METADATA -> ((resp: requests.MetadataResponse) => resp.errors.asScala.find(_._1 == topic).getOrElse(("test", Errors.NONE))._2), ApiKeys.PRODUCE -> ((resp: requests.ProduceResponse) => { + + val topicId = topicNames.find { case (_, topicName) => topicName == topic} + .map { case (topicId, _) => topicId } + .getOrElse(Uuid.ZERO_UUID) Review Comment: It seems that this test always sends produce requests with the latest version. Perhaps we could add a comment and remove `if (version >= 13)` ? -- 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