jolshan commented on code in PR #13231: URL: https://github.com/apache/kafka/pull/13231#discussion_r1125017580
########## clients/src/test/java/org/apache/kafka/common/requests/RequestResponseTest.java: ########## @@ -2598,12 +2604,37 @@ private OffsetsForLeaderEpochResponse createLeaderEpochResponse() { } private AddPartitionsToTxnRequest createAddPartitionsToTxnRequest(short version) { - return new AddPartitionsToTxnRequest.Builder("tid", 21L, (short) 42, - singletonList(new TopicPartition("topic", 73))).build(version); + if (version < 4) { + return AddPartitionsToTxnRequest.Builder.forClient("tid", 21L, (short) 42, + singletonList(new TopicPartition("topic", 73))).build(version); + } else { + AddPartitionsToTxnTransactionCollection transactions = new AddPartitionsToTxnTransactionCollection( + singletonList(new AddPartitionsToTxnTransaction() Review Comment: It's a bit too long for the previous line though. I made it 4 instead of 8 spaces. -- 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