rreddy-22 commented on code in PR #17402: URL: https://github.com/apache/kafka/pull/17402#discussion_r1819879744
########## clients/src/test/java/org/apache/kafka/clients/producer/internals/TransactionManagerTest.java: ########## @@ -3108,15 +3180,25 @@ public void testAbortTransactionAndResetSequenceNumberOnUnknownProducerId() thro transactionManager.beginTransaction(); transactionManager.maybeAddPartition(tp0); - prepareAddPartitionsToTxnResponse(Errors.NONE, tp0, epoch, producerId); + if (!transactionV2Enabled) { + prepareAddPartitionsToTxnResponse(Errors.NONE, tp0, epoch, producerId); + } else { + prepareAddPartitionsToTxnResponse(Errors.NONE, tp0, (short) (epoch + 1), producerId); + } runUntil(() -> transactionManager.isPartitionAdded(tp0)); assertEquals(0, transactionManager.sequenceNumber(tp0)); - assertEquals(1, transactionManager.sequenceNumber(tp1)); + Review Comment: The reason why I modified it was because when we use Tv2 the sequence is reset for tp1 on abort too, I think nothing really changes for tp0 like you mentioned. -- 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