Russole commented on code in PR #23378:
URL: https://github.com/apache/kafka/pull/23378#discussion_r4036141273
##########
tools/src/test/java/org/apache/kafka/tools/consumer/group/ListConsumerGroupTest.java:
##########
@@ -521,36 +502,26 @@ private Map<String, Object> composeConfigs(String
groupId, String groupProtocol,
if (GroupProtocol.CLASSIC.name.equalsIgnoreCase(groupProtocol)) {
configs.put(PARTITION_ASSIGNMENT_STRATEGY_CONFIG,
RangeAssignor.class.getName());
}
-
- configs.putAll(customConfigs);
return configs;
}
private ConsumerGroupCommand.ConsumerGroupService
getConsumerGroupService(String[] args) {
ConsumerGroupCommandOptions opts =
ConsumerGroupCommandOptions.fromArgs(args);
- ConsumerGroupCommand.ConsumerGroupService service = new
ConsumerGroupCommand.ConsumerGroupService(
+ return new ConsumerGroupCommand.ConsumerGroupService(
opts,
Map.of(AdminClientConfig.RETRIES_CONFIG,
Integer.toString(Integer.MAX_VALUE))
);
-
- return service;
- }
-
- private void createTopic(String topic) {
- try (Admin admin =
Admin.create(Map.of(CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG,
clusterInstance.bootstrapServers()))) {
- Assertions.assertDoesNotThrow(() -> admin.createTopics(List.of(new
NewTopic(topic, 1, (short) 1))).topicId(topic).get());
- }
}
private void deleteTopic(String topic) {
- try (Admin admin =
Admin.create(Map.of(CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG,
clusterInstance.bootstrapServers()))) {
- Assertions.assertDoesNotThrow(() ->
admin.deleteTopics(Set.of(topic)).all().get());
+ try (Admin admin = clusterInstance.admin()) {
+ assertDoesNotThrow(() ->
admin.deleteTopics(Set.of(topic)).all().get());
Review Comment:
Thanks. Updated as suggested.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]