rreddy-22 commented on code in PR #17402: URL: https://github.com/apache/kafka/pull/17402#discussion_r1819913231
########## 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 epoch bump in this case (unknown pid Error) is being checked in another test, discussed offline to remove the V2 check for when initPid version doesn't support epoch bump -- 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