chia7712 commented on code in PR #22453:
URL: https://github.com/apache/kafka/pull/22453#discussion_r4030783651
##########
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:
the zk migration is not supported by 4.x, right?
--
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]