lianetm commented on code in PR #16140:
URL: https://github.com/apache/kafka/pull/16140#discussion_r1630033370


##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/ConsumerNetworkThreadTest.java:
##########
@@ -212,40 +251,15 @@ public void testResetPositionsProcessFailureIsIgnored() {
         
verify(applicationEventProcessor).process(any(ResetPositionsEvent.class));
     }
 
-    @Test
-    public void testValidatePositionsEventIsProcessed() {
-        ValidatePositionsEvent e = new 
ValidatePositionsEvent(calculateDeadlineMs(time, 100));
-        applicationEventsQueue.add(e);
-        consumerNetworkThread.runOnce();
-        
verify(applicationEventProcessor).process(any(ValidatePositionsEvent.class));
-        assertTrue(applicationEventsQueue.isEmpty());
-    }
-
-    @Test
-    public void testAssignmentChangeEvent() {
-        HashMap<TopicPartition, OffsetAndMetadata> offset = 
mockTopicPartitionOffset();
-
-        final long currentTimeMs = time.milliseconds();
-        ApplicationEvent e = new AssignmentChangeEvent(offset, currentTimeMs);
-        applicationEventsQueue.add(e);
-
-        consumerNetworkThread.runOnce();
-        
verify(applicationEventProcessor).process(any(AssignmentChangeEvent.class));
-        verify(networkClient, times(1)).poll(anyLong(), anyLong());
-        verify(commitRequestManager, 
times(1)).updateAutoCommitTimer(currentTimeMs);
-        // Assignment change should generate an async commit (not retried).
-        verify(commitRequestManager, times(1)).maybeAutoCommitAsync();
-    }
-
-    @Test
-    void testFetchTopicMetadata() {
-        applicationEventsQueue.add(new TopicMetadataEvent("topic", 
Long.MAX_VALUE));
-        consumerNetworkThread.runOnce();
-        
verify(applicationEventProcessor).process(any(TopicMetadataEvent.class));
-    }
-
     @Test
     void testPollResultTimer() {

Review Comment:
   This test is all about the `NetworkClientDelegate`, no interaction at all 
with the `ConsumerNetworkThread` right? Should be completely moved to 
`NetorkClientDelegateTest` I would say (this PR or separately, as you wish)



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to