MINOR: Add test case for topic recreation with collision chars#12796
Merged
hachikuji merged 2 commits intoapache:trunkfrom Oct 29, 2022
Merged
MINOR: Add test case for topic recreation with collision chars#12796hachikuji merged 2 commits intoapache:trunkfrom
hachikuji merged 2 commits intoapache:trunkfrom
Conversation
jsancio
reviewed
Oct 28, 2022
Member
jsancio
left a comment
There was a problem hiding this comment.
Thanks @hachikuji. LGTM if the tests are green.
Comment on lines
+718
to
+730
| 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)); | ||
| } |
Member
There was a problem hiding this comment.
Does this test fail against trunk prior to merging #12790?
Member
|
Thanks for helping adding the tests, @hachikuji ! |
guozhangwang
pushed a commit
to guozhangwang/kafka
that referenced
this pull request
Jan 25, 2023
…e#12796) This patch adds a unit test for topic recreation with colliding characters (such as `.`). This was broken up until apache#12790. Reviewers: José Armando García Sancio <jsancio@users.noreply.github.com>
rutvijmehta-harness
pushed a commit
to rutvijmehta-harness/kafka
that referenced
this pull request
Feb 9, 2024
…e#12796) This patch adds a unit test for topic recreation with colliding characters (such as `.`). This was broken up until apache#12790. Reviewers: José Armando García Sancio <jsancio@users.noreply.github.com>
rutvijmehta-harness
added a commit
to rutvijmehta-harness/kafka
that referenced
this pull request
Feb 9, 2024
…e#12796) (#91) This patch adds a unit test for topic recreation with colliding characters (such as `.`). This was broken up until apache#12790. Reviewers: José Armando García Sancio <jsancio@users.noreply.github.com> Co-authored-by: Jason Gustafson <jason@confluent.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch adds a unit test for topic recreation with colliding characters (such as
.). This was broken up until #12790.Committer Checklist (excluded from commit message)