squah-confluent commented on code in PR #23732:
URL: https://github.com/apache/kafka/pull/23732#discussion_r4239922387


##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/assignor/uniform2/CurrentAssignmentTest.java:
##########
@@ -0,0 +1,267 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.kafka.coordinator.group.assignor.uniform2;
+
+import org.apache.kafka.common.Uuid;
+import 
org.apache.kafka.coordinator.group.api.assignor.SubscribedTopicDescriber;
+import org.apache.kafka.coordinator.group.assignor.uniform2.util.IntList;
+
+import org.junit.jupiter.api.Test;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import static java.util.Map.entry;
+import static 
org.apache.kafka.coordinator.group.AssignmentTestUtil.mkAssignment;
+import static 
org.apache.kafka.coordinator.group.AssignmentTestUtil.mkTopicAssignment;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertSame;
+
+/**
+ * Tests of {@link CurrentAssignment}: the owners of the partitions, the 
members holding stale
+ * partitions, and the sets of partitions beyond the partition count.
+ *
+ * <p>The member ids sort as A &lt; B &lt; C, so that A is member 0, B is 
member 1 and C is member
+ * 2, and the topic ids as T1 &lt; T2, so that T1 is topic 0 and T2 is topic 
1. T1 has 4
+ * partitions and T2 has 3. The missing topic does not exist.
+ */
+public class CurrentAssignmentTest {
+    private static final Uuid T1 = new Uuid(1L, 1L);
+    private static final Uuid T2 = new Uuid(2L, 1L);
+    private static final Uuid MISSING = new Uuid(9L, 1L);
+
+    private static final int A = 0;
+    private static final int B = 1;
+    private static final int C = 2;
+
+    private static final SubscribedTopicDescriber DESCRIBER = new 
TopicsFixture()
+        .withTopic(T1, 4)
+        .withTopic(T2, 3)
+        .build();
+
+    /**
+     * A holds partitions 0 and 3 of T1 and 1 of T2, B holds partition 1 of 
T1, and C holds
+     * partitions 0 and 2 of T2. Partition 2 of T1 has no owner. The 
assignment of every member
+     * is its very map of partitions.

Review Comment:
   javadoc, nit, claudish: 
   > The assignment of every member is its very map of partitions.
   
   unclear what this means.



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