FrankYang0529 commented on code in PR #16673:
URL: https://github.com/apache/kafka/pull/16673#discussion_r1722662393


##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/events/ApplicationEventProcessorTest.java:
##########
@@ -145,6 +148,39 @@ public void testResetPositionsProcess() {
         
verify(applicationEventProcessor).process(any(ResetPositionsEvent.class));
     }
 
+    @ParameterizedTest
+    @ValueSource(booleans = {true, false})
+    public void testAssignmentChangeEvent(boolean withGroupId) {
+        final long currentTimeMs = 12345;
+        AssignmentChangeEvent event = new AssignmentChangeEvent(currentTimeMs, 
12345, Collections.emptyList());
+
+        setupProcessor(withGroupId);
+        doReturn(true).when(subscriptionState).assignFromUser(any());
+        processor.process(event);
+        if (withGroupId) {
+            verify(commitRequestManager).updateAutoCommitTimer(currentTimeMs);
+            verify(commitRequestManager).maybeAutoCommitAsync();
+        } else {
+            verify(commitRequestManager, 
never()).updateAutoCommitTimer(currentTimeMs);
+            verify(commitRequestManager, never()).maybeAutoCommitAsync();
+        }
+        verify(metadata).requestUpdateForNewTopics();

Review Comment:
   Yes, updated it. Thank you.



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