sciclon2 commented on code in PR #15030: URL: https://github.com/apache/kafka/pull/15030#discussion_r1434907926
########## tools/src/main/java/org/apache/kafka/tools/LeaderElectionCommand.java: ########## @@ -99,8 +99,12 @@ static void run(Duration timeoutMs, String... args) throws Exception { props.putAll(Utils.loadProps(commandOptions.getAdminClientConfig())); } props.setProperty(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, commandOptions.getBootstrapServer()); - props.setProperty(AdminClientConfig.DEFAULT_API_TIMEOUT_MS_CONFIG, Long.toString(timeoutMs.toMillis())); - props.setProperty(AdminClientConfig.REQUEST_TIMEOUT_MS_CONFIG, Long.toString(timeoutMs.toMillis() / 2)); + if (!props.containsKey(AdminClientConfig.DEFAULT_API_TIMEOUT_MS_CONFIG)) { + props.setProperty(AdminClientConfig.DEFAULT_API_TIMEOUT_MS_CONFIG, Long.toString(timeoutMs.toMillis())); + } + if (!props.containsKey(AdminClientConfig.REQUEST_TIMEOUT_MS_CONFIG)) { + props.setProperty(AdminClientConfig.REQUEST_TIMEOUT_MS_CONFIG, Long.toString(timeoutMs.toMillis() / 2)); Review Comment: thanks for the review @divijvaidya I will do the change you proposed and add the test -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org