jolshan commented on code in PR #17402: URL: https://github.com/apache/kafka/pull/17402#discussion_r1819888926
########## 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: Right, I was just saying that the check for the sequence is not the main point in the test for tv2. We could do something like check epoch is bumped for example. For TV 0 it is pretty important. -- 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