deegoy2 commented on code in PR #21114:
URL: https://github.com/apache/kafka/pull/21114#discussion_r2628390658


##########
metadata/src/test/java/org/apache/kafka/controller/PartitionReassignmentReplicasTest.java:
##########
@@ -197,12 +197,80 @@ public void testIsReassignmentInProgress() {
     }
 
     @Test
-    public void 
testDoesNotCompleteReassignmentIfIsrDoesNotHaveAllTargetReplicas() {
+    public void 
testCanCompleteReassignmentIfIsrDoesNotHaveAnExistingTargetReplica() {
         PartitionReassignmentReplicas replicas = new 
PartitionReassignmentReplicas(
-            partitionAssignment(List.of(0, 1, 2)), 
partitionAssignment(List.of(0, 1, 3)));
+                partitionAssignment(List.of(0, 1, 2)), 
partitionAssignment(List.of(0, 1, 3)));
+        assertTrue(replicas.isReassignmentInProgress());
+
+        // Replica 1 is not in sync
+        Optional<PartitionReassignmentReplicas.CompletedReassignment> 
reassignmentOptional =
+                replicas.maybeCompleteReassignment(List.of(0, 2, 3));

Review Comment:
   Does the newly added 
`testCanCompleteReassignmentIfIsrDoesNotHaveBothExistingTargetReplica` test 
cover the case?



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