-
Notifications
You must be signed in to change notification settings - Fork 14.8k
MINOR: Deduplicate common test helpers in group-coordinator tests #21047
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
Conversation
| } | ||
| } | ||
|
|
||
| protected def createTopicWithAdminRaw( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have createTopic in this class. I wonder whether we could unify both. Have you checked by chance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could use createTopic as well I believe, but that method waits for the metadata to propagate to all brokers. The helper we are introducing here (extracted from existing test usage) simply creates the topic and returns without waiting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using createTopic now
| // in this test because it does not use FindCoordinator API. | ||
| createOffsetsTopic() | ||
|
|
||
| val admin = cluster.admin() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I missed removing it earlier. I have removed it now.
dajac
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks.
This PR adds a helper method to create topics using the raw admin client
in
GroupCoordinatorBaseRequestTest. It also updates related tests touse the existing
createOffsetsTopichelper instead of manuallyduplicating topic-creation logic in multiple places. No functional
changes to test behavior.
Reviewers: David Jacot djacot@confluent.io