rreddy-22 commented on code in PR #16068: URL: https://github.com/apache/kafka/pull/16068#discussion_r1621587957
########## group-coordinator/src/test/java/org/apache/kafka/coordinator/group/assignor/GeneralUniformAssignmentBuilderTest.java: ########## @@ -585,34 +586,34 @@ public void testReassignmentWhenOneSubscriptionRemovedAfterInitialAssignmentWith )); // Initial subscriptions were [T1, T2] - Map<String, AssignmentMemberSpec> members = new HashMap<>(); + Map<String, MemberSubscriptionSpec> members = new TreeMap<>(); + Map<String, Map<Uuid, Set<Integer>>> assignedPartitions = new HashMap<>(); Map<Uuid, Set<Integer>> currentAssignmentForA = mkAssignment( mkTopicAssignment(topic1Uuid, 0, 2), mkTopicAssignment(topic2Uuid, 1, 3) ); - members.put(memberA, new AssignmentMemberSpec( + assignedPartitions.put(memberA, currentAssignmentForA); + members.put(memberA, new MemberSubscriptionSpecImpl( Optional.empty(), - Optional.empty(), - Collections.singleton(topic1Uuid), - currentAssignmentForA + Collections.singleton(topic1Uuid) )); Map<Uuid, Set<Integer>> currentAssignmentForB = mkAssignment( mkTopicAssignment(topic1Uuid, 1), mkTopicAssignment(topic2Uuid, 0, 2, 4) ); - members.put(memberB, new AssignmentMemberSpec( - Optional.empty(), + assignedPartitions.put(memberB, currentAssignmentForB); + members.put(memberB, new MemberSubscriptionSpecImpl( Optional.empty(), - mkSet(topic1Uuid, topic2Uuid), - currentAssignmentForB + new HashSet<>(Arrays.asList(topic1Uuid, topic2Uuid)) )); GroupSpec groupSpec = new GroupSpecImpl( members, HETEROGENEOUS, - invertedTargetAssignment(members) + assignedPartitions, + invertedTargetAssignment(assignedPartitions, members) ); SubscribedTopicMetadata subscribedTopicMetadata = new SubscribedTopicMetadata(topicMetadata); Review Comment: yep sounds good -- 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