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


##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/StoreChangelogReaderTest.java:
##########
@@ -1335,9 +1299,6 @@ public void 
shouldTransitStateBackToActiveRestoringAfterRemovingLastTask() {
         when(standbyStateManager.taskType()).thenReturn(STANDBY);
         final StoreChangelogReader changelogReader = new 
StoreChangelogReader(time, config, logContext, adminClient, consumer, callback, 
standbyListener);
         
when(standbyStateManager.storeMetadata(tp1)).thenReturn(storeMetadataOne);
-        
EasyMock.expect(storeMetadataOne.changelogPartition()).andReturn(tp1).anyTimes();
-        EasyMock.expect(storeMetadataOne.store()).andReturn(store).anyTimes();
-        EasyMock.replay(store, storeMetadataOne);

Review Comment:
   According to Mockito these were unused



##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/StoreChangelogReaderTest.java:
##########
@@ -223,9 +202,6 @@ public void shouldNotRegisterStoreWithoutMetadata() {
     @Test
     public void shouldSupportUnregisterChangelogBeforeInitialization() {
         setupStateManagerMock();
-        final Map<TaskId, Task> mockTasks = mock(Map.class);
-        
EasyMock.expect(mockTasks.get(null)).andReturn(mock(Task.class)).anyTimes();
-        EasyMock.replay(mockTasks, store);

Review Comment:
   The mockTasks were reported as unused by Mockito



##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/StoreChangelogReaderTest.java:
##########
@@ -307,15 +284,16 @@ public void 
shouldSupportUnregisterChangelogBeforeCompletion() {
     public void shouldSupportUnregisterChangelogAfterCompletion() {
         setupStateManagerMock();
         setupStoreMetadata();
+        setupStore();
+        @SuppressWarnings("unchecked")

Review Comment:
   This is required because otherwise mocking a Map throws a tantrum. However, 
if there are nicer ways to achieve the same I am more than happy to change it



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