mingyen066 commented on code in PR #20335:
URL: https://github.com/apache/kafka/pull/20335#discussion_r2267529472


##########
core/src/test/scala/unit/kafka/cluster/AssignmentStateTest.scala:
##########
@@ -86,31 +86,35 @@ class AssignmentStateTest extends AbstractPartitionTest {
 
   @ParameterizedTest
   @MethodSource(Array("parameters"))
-  def testPartitionAssignmentStatus(isr: util.List[Integer], replicas: 
util.List[Integer],
-                                    adding: util.List[Integer], removing: 
util.List[Integer],
+  def testPartitionAssignmentStatus(isr: Array[Int], replicas: Array[Int],
+                                    adding: Array[Int], removing: Array[Int],
                                     original: util.List[Int], 
isUnderReplicated: Boolean): Unit = {
-    val leaderState = new PartitionState()
+    val partitionRegistrationBuilder = new PartitionRegistration.Builder()
       .setLeader(brokerId)
+      .setLeaderRecoveryState(LeaderRecoveryState.RECOVERED)
       .setLeaderEpoch(6)
       .setIsr(isr)
       .setPartitionEpoch(1)
       .setReplicas(replicas)
-      .setIsNew(false)
-    if (!adding.isEmpty)
-      leaderState.setAddingReplicas(adding)
-    if (!removing.isEmpty)
-      leaderState.setRemovingReplicas(removing)
+      .setDirectories(DirectoryId.unassignedArray(replicas.length))
+    if (adding.nonEmpty)
+      partitionRegistrationBuilder.setAddingReplicas(adding)
+//      leaderState.setAddingReplicas(adding)

Review Comment:
   I forgot to remove it—thanks for the reminder!



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