Skip to content

MINOR: rewrite TopicBasedRemoteLogMetadataManagerTest by ClusterTestE…#15917

Merged
chia7712 merged 1 commit intoapache:trunkfrom
chia7712:MINOR-15917
May 16, 2024
Merged

MINOR: rewrite TopicBasedRemoteLogMetadataManagerTest by ClusterTestE…#15917
chia7712 merged 1 commit intoapache:trunkfrom
chia7712:MINOR-15917

Conversation

@chia7712
Copy link
Copy Markdown
Member

This is the first PR used to migrate tests of storage to new test infra. With the new test infra, we can make those tests run on either zk or kraft cluster easily.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@chia7712 chia7712 requested review from kamalcph, satishd and showuon May 10, 2024 12:29
Copy link
Copy Markdown
Contributor

@kamalcph kamalcph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left minor comments. PTAL. Thanks!

@chia7712
Copy link
Copy Markdown
Member Author

@kamalcph thanks for all your reviews. I have addressed them in ff2c163

Copy link
Copy Markdown
Member

@showuon showuon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the improvement. Left some comments.


void waitForReadyBrokers() throws InterruptedException;

default void waitForTopic(String topic, int partitions) throws InterruptedException {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@showuon I add a helper to make all ClusterInstance users :)

Copy link
Copy Markdown
Member

@showuon showuon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update.

String logDir = TestUtils.tempDirectory("rlmm_segs_").getAbsolutePath();
TopicBasedRemoteLogMetadataManager topicBasedRemoteLogMetadataManager = new TopicBasedRemoteLogMetadataManager(startConsumerThread);

System.out.println("[CHIA] " + bootstrapServers);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debug log

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(facepalm)

Comment on lines +51 to +56
topicBasedRemoteLogMetadataManager = RemoteLogMetadataManagerTestUtils.builder()
.topicIdPartitions(topicIdPartitions)
.bootstrapServers(bootstrapServers(listenerName()))
.startConsumerThread(startConsumerThread)
.remoteLogMetadataTopicPartitioner(remoteLogMetadataTopicPartitioner)
.build();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the refactor!

@chia7712
Copy link
Copy Markdown
Member Author

@showuon Please take a look if you have free time. I'd like to migrate all tests of storage to new test infra after this PR gets merged.

Copy link
Copy Markdown
Member

@showuon showuon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@chia7712
Copy link
Copy Markdown
Member Author

I will merge #15962 first and then rebase this PR

@chia7712 chia7712 merged commit 2c51594 into apache:trunk May 16, 2024
rreddy-22 pushed a commit to rreddy-22/kafka-rreddy that referenced this pull request May 24, 2024
…xtensions (apache#15917)

Reviewers: Kamal Chandraprakash <kamal.chandraprakash@gmail.com>, Luke Chen <showuon@gmail.com>
TaiJuWu pushed a commit to TaiJuWu/kafka that referenced this pull request Jun 8, 2024
…xtensions (apache#15917)

Reviewers: Kamal Chandraprakash <kamal.chandraprakash@gmail.com>, Luke Chen <showuon@gmail.com>
gongxuanzhang pushed a commit to gongxuanzhang/kafka that referenced this pull request Jun 12, 2024
…xtensions (apache#15917)

Reviewers: Kamal Chandraprakash <kamal.chandraprakash@gmail.com>, Luke Chen <showuon@gmail.com>
@chia7712 chia7712 deleted the MINOR-15917 branch September 13, 2024 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants