chia7712 commented on code in PR #18727: URL: https://github.com/apache/kafka/pull/18727#discussion_r1937752816
########## core/src/test/scala/unit/kafka/server/ProduceRequestTest.scala: ########## @@ -283,6 +286,48 @@ class ProduceRequestTest extends BaseRequestTest { assertEquals(-1, partitionProduceResponse1.logAppendTimeMs) } + /** + * See `ApiKeys.PRODUCE_OLDEST_VERSION` for the details of why we need special handling for produce request v0-v2 (inclusive). + */ + @Test + def testProduceRequestV0ToV2IsRejectedByBroker(): Unit = { Review Comment: > the separate file would not have be able to use the same api key id. Pardon me, what is the issue of defining `"apiKey": 0` in other file (test scope) ? I create `kafka/clients/src/test/resources/common/message/LegacyProduceRequest.json` according to v0-v2, and it works well. -- 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