chia7712 commented on code in PR #18727: URL: https://github.com/apache/kafka/pull/18727#discussion_r1937725987
########## 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: It seems the primary purpose of retaining v0-v2 is to facilitate easier test writing. Perhaps we could create a `LegacyProduceRequest` json that mirrors the v0-v2 format exclusively for testing purposes? -- 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