chickenchickenlove commented on code in PR #23638:
URL: https://github.com/apache/kafka/pull/23638#discussion_r4650177707


##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/streams/StreamsGroupMemberTest.java:
##########
@@ -421,6 +430,35 @@ public void testAsStreamsGroupDescribeMember() {
         assertEquals(expected, actual);
     }
 
+    @Test
+    public void 
testAsStreamsGroupDescribeMemberWithOnlyTasksPendingRevocation() {
+        final StreamsGroupMember member = new 
StreamsGroupMember.Builder(createStreamsGroupMember())
+            .setState(MemberState.UNREVOKED_TASKS)
+            .setAssignedTasks(TasksTupleWithEpochs.EMPTY)
+            .build();
+
+        StreamsGroupDescribeResponseData.Member actual = 
member.asStreamsGroupDescribeMember(TasksTuple.EMPTY, MemberTaskOffsets.EMPTY);
+        StreamsGroupDescribeResponseData.Assignment expected = new 
StreamsGroupDescribeResponseData.Assignment()
+            .setActiveTasks(List.of(
+                new StreamsGroupDescribeResponseData.TaskIds()
+                    .setSubtopologyId(SUBTOPOLOGY2)
+                    .setPartitions(List.of(1, 2, 3))
+            ))
+            .setStandbyTasks(List.of(
+                new StreamsGroupDescribeResponseData.TaskIds()
+                    .setSubtopologyId(SUBTOPOLOGY1)
+                    .setPartitions(List.of(4, 5, 6))
+            ))
+            .setWarmupTasks(List.of(
+                new StreamsGroupDescribeResponseData.TaskIds()
+                    .setSubtopologyId(SUBTOPOLOGY2)
+                    .setPartitions(List.of(7, 9))
+            ));
+
+        assertEquals(expected, actual.assignment());
+        assertEquals(new StreamsGroupDescribeResponseData.Assignment(), 
actual.targetAssignment());

Review Comment:
   Duplicated comment.



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