jsancio commented on code in PR #12796:
URL: https://github.com/apache/kafka/pull/12796#discussion_r1008380883


##########
metadata/src/test/java/org/apache/kafka/controller/ReplicationControlManagerTest.java:
##########
@@ -698,6 +714,21 @@ public void testCreateTopicsWithPolicy() throws Exception {
         ctx.createTestTopic("quux", new int[][] {new int[] {1, 2, 0}}, 
POLICY_VIOLATION.code());
     }
 
+    @Test
+    public void testCreateTopicWithCollisionChars() throws Exception {
+        ReplicationControlTestContext ctx = new 
ReplicationControlTestContext(Optional.empty());
+        ctx.registerBrokers(0, 1, 2);
+        ctx.unfenceBrokers(0, 1, 2);
+
+        CreatableTopicResult initialTopic = ctx.createTestTopic("foo.bar", 2, 
(short) 2, NONE.code());
+        assertEquals(2, 
ctx.replicationControl.getTopic(initialTopic.topicId()).numPartitions(Long.MAX_VALUE));
+        ctx.deleteTopic(initialTopic.topicId());
+
+        CreatableTopicResult recreatedTopic = ctx.createTestTopic("foo.bar", 
4, (short) 2, NONE.code());
+        assertNotEquals(initialTopic.topicId(), recreatedTopic.topicId());
+        assertEquals(4, 
ctx.replicationControl.getTopic(recreatedTopic.topicId()).numPartitions(Long.MAX_VALUE));
+    }

Review Comment:
   Does this test fail against trunk prior to merging 
https://github.com/apache/kafka/pull/12790?



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