sahildevgon commented on code in PR #22453:
URL: https://github.com/apache/kafka/pull/22453#discussion_r4184630870


##########
metadata/src/test/java/org/apache/kafka/controller/ReplicationControlManagerTest.java:
##########
@@ -1203,6 +1203,65 @@ public void testEligibleLeaderReplicas_EffectiveMinIsr() 
{
         assertEquals(3, replicationControl.getTopicEffectiveMinIsr("foo"));
     }
 
+    // KAFKA-20532: regression tests — getTopicEffectiveMinIsr must tolerate 
whitespace-padded
+    // min.insync.replicas values that bypass ConfigDef trimming and are 
stored raw.
+    @Test
+    public void testGetTopicEffectiveMinIsr_LeadingWhitespace() {
+        ReplicationControlTestContext ctx = new 
ReplicationControlTestContext.Builder().setIsElrEnabled(true).build();
+        ReplicationControlManager replicationControl = ctx.replicationControl;
+        ctx.registerBrokers(0, 1, 2);
+        ctx.unfenceBrokers(0, 1, 2);
+        ctx.createTestTopic("foo", new int[][]{new int[]{0, 1, 2}});
+
+        // Simulate a whitespace-contaminated value reaching the metadata 
store (e.g. via ZK

Review Comment:
   You're right - ZK mode and the ZK - KRaft migration were removed in 4.0, so 
that comment is wrong and I'll drop the ZK reference.



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