Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MINOR: rewrite TopicBasedRemoteLogMetadataManagerTest by ClusterTestE… #15917

Merged
merged 1 commit into from May 16, 2024

Conversation

chia7712
Copy link
Contributor

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)

Copy link
Collaborator

@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
Contributor Author

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

Copy link
Contributor

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

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

Choose a reason for hiding this comment

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

debug log

Copy link
Contributor 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
Contributor

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

@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
Contributor Author

I will merge #15962 first and then rebase this PR

@chia7712 chia7712 merged commit 2c51594 into apache:trunk May 16, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants