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


##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/MembershipManagerImplTest.java:
##########
@@ -747,7 +741,7 @@ public void 
testDelayedReconciliationResultAppliedWhenTargetChangedWithMetadataU
         membershipManager.poll(time.milliseconds());
 
         assertEquals(Collections.emptySet(), 
membershipManager.topicsAwaitingReconciliation());
-        
verify(subscriptionState).assignFromSubscribed(topicPartitions(topic2Assignment,
 topic2Metadata));
+        
verify(subscriptionState).assignFromSubscribedAwaitingCallback(eq(topicPartitions(topic2Assignment,
 topic2Metadata)), eq(topicPartitions(topic2Assignment, topic2Metadata)));

Review Comment:
   is there a reason to use the `eq` here, that we're providing the to specific 
arguments? 



##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/MembershipManagerImplTest.java:
##########
@@ -2489,7 +2490,9 @@ private void 
testRevocationCompleted(MembershipManagerImpl membershipManager,
         verify(subscriptionState).markPendingRevocation(anySet());
         List<TopicPartition> expectedTopicPartitionAssignment =
                 buildTopicPartitions(expectedCurrentAssignment);
-        verify(subscriptionState).assignFromSubscribed(new 
HashSet<>(expectedTopicPartitionAssignment));
+        HashSet<TopicPartition> expectedSet = new 
HashSet<>(expectedTopicPartitionAssignment);
+        HashSet<TopicPartition> emptySet = new HashSet<>();

Review Comment:
   we could simplify removing this and just reference `Collections.emptySet()` 
on the 2nd param of the assignFromSubscribedAwaitingCallback



##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/MembershipManagerImplTest.java:
##########
@@ -747,7 +741,7 @@ public void 
testDelayedReconciliationResultAppliedWhenTargetChangedWithMetadataU
         membershipManager.poll(time.milliseconds());
 
         assertEquals(Collections.emptySet(), 
membershipManager.topicsAwaitingReconciliation());
-        
verify(subscriptionState).assignFromSubscribed(topicPartitions(topic2Assignment,
 topic2Metadata));
+        
verify(subscriptionState).assignFromSubscribedAwaitingCallback(eq(topicPartitions(topic2Assignment,
 topic2Metadata)), eq(topicPartitions(topic2Assignment, topic2Metadata)));

Review Comment:
   if we don't need it let's remove it in other places when possible



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