clolov commented on code in PR #14410:
URL: https://github.com/apache/kafka/pull/14410#discussion_r1369961591


##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/StreamsProducerTest.java:
##########
@@ -197,8 +203,7 @@ public void before() {
             );
         eosBetaStreamsProducer.initTransaction();
         eosBetaMockProducer = eosBetaMockClientSupplier.producers.get(0);
-        
expect(mockTime.nanoseconds()).andAnswer(Time.SYSTEM::nanoseconds).anyTimes();
-        replay(mockTime);
+        when(mockTime.nanoseconds()).thenReturn(Time.SYSTEM.nanoseconds());

Review Comment:
   I will let Ismael decide on this. For other tests which were moved to 
Mockito I did not change (too many) assertions because I was more focused on 
the migration rather than test cleanup, but there were exceptions and I don't 
feel too strongly about this.



##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/StreamsProducerTest.java:
##########
@@ -1173,17 +1126,13 @@ public void 
shouldResetTransactionInitializedOnResetProducer() {
         );
         streamsProducer.initTransaction();
 
-        reset(mockedProducer);
-        mockedProducer.close();
-        mockedProducer.initTransactions();

Review Comment:
   Okay, but can you at least add this explanation in a condensed form above 
the verify(mockedProducer, ...).initTransactions() line?



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

Reply via email to