bob-barrett commented on a change in pull request #8239:
URL: https://github.com/apache/kafka/pull/8239#discussion_r454922264



##########
File path: 
core/src/test/scala/unit/kafka/coordinator/transaction/TransactionCoordinatorTest.scala
##########
@@ -564,7 +564,7 @@ class TransactionCoordinatorTest {
       .anyTimes()
 
     val originalMetadata = new TransactionMetadata(transactionalId, 
producerId, producerId, (producerEpoch + 1).toShort,
-      producerEpoch, txnTimeoutMs, Ongoing, partitions, time.milliseconds(), 
time.milliseconds())
+      (producerEpoch - 1).toShort, txnTimeoutMs, Ongoing, partitions, 
time.milliseconds(), time.milliseconds())

Review comment:
       Yeah, this was wrong. This and a couple other weird values were a 
consequence of that change above to how we set the last epoch in 
`endTransactions`. After fixing that and fixing some of the EasyMock returns, 
all the values make sense now (we don't have any last epoch's that are more 
than 1 less than the epoch).

##########
File path: 
core/src/test/scala/unit/kafka/coordinator/transaction/TransactionCoordinatorTest.scala
##########
@@ -564,7 +564,7 @@ class TransactionCoordinatorTest {
       .anyTimes()
 
     val originalMetadata = new TransactionMetadata(transactionalId, 
producerId, producerId, (producerEpoch + 1).toShort,
-      producerEpoch, txnTimeoutMs, Ongoing, partitions, time.milliseconds(), 
time.milliseconds())
+      (producerEpoch - 1).toShort, txnTimeoutMs, Ongoing, partitions, 
time.milliseconds(), time.milliseconds())

Review comment:
       Yeah, my change here was wrong. This and a couple other weird values 
were a consequence of that change above to how we set the last epoch in 
`endTransactions`. After fixing that and fixing some of the EasyMock returns, 
all the values make sense now (we don't have any last epoch's that are more 
than 1 less than the epoch).




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to