majialoong commented on code in PR #23430:
URL: https://github.com/apache/kafka/pull/23430#discussion_r3999824739
##########
tools/src/test/java/org/apache/kafka/tools/consumer/group/ConsumerGroupCommandSaslAuthenticationTest.java:
##########
@@ -109,6 +113,15 @@ private void
testConsumerGroupServiceWithAuthenticationFailure(GroupProtocol gro
private void
testConsumerGroupServiceWithAuthenticationSuccess(GroupProtocol groupProtocol)
throws Exception {
cluster.createTopic(TOPIC, 1, (short) 1);
createScramCredential(SCRAM_USER, SCRAM_PASSWORD);
+ for (KafkaBroker broker : cluster.brokers().values()) {
Review Comment:
Could we move this wait into `createScramCredential` so it returns only when
the credentials are ready?
##########
tools/src/test/java/org/apache/kafka/tools/consumer/group/ConsumerGroupCommandSaslAuthenticationTest.java:
##########
@@ -109,6 +113,15 @@ private void
testConsumerGroupServiceWithAuthenticationFailure(GroupProtocol gro
private void
testConsumerGroupServiceWithAuthenticationSuccess(GroupProtocol groupProtocol)
throws Exception {
cluster.createTopic(TOPIC, 1, (short) 1);
createScramCredential(SCRAM_USER, SCRAM_PASSWORD);
+ for (KafkaBroker broker : cluster.brokers().values()) {
+ CredentialCache.Cache<ScramCredential> cache =
+ broker.credentialProvider().credentialCache
Review Comment:
Could we also keep the indentation consistent with the surrounding code?
##########
tools/src/test/java/org/apache/kafka/tools/consumer/group/ConsumerGroupCommandSaslAuthenticationTest.java:
##########
@@ -109,6 +113,15 @@ private void
testConsumerGroupServiceWithAuthenticationFailure(GroupProtocol gro
private void
testConsumerGroupServiceWithAuthenticationSuccess(GroupProtocol groupProtocol)
throws Exception {
cluster.createTopic(TOPIC, 1, (short) 1);
createScramCredential(SCRAM_USER, SCRAM_PASSWORD);
+ for (KafkaBroker broker : cluster.brokers().values()) {
+ CredentialCache.Cache<ScramCredential> cache =
+ broker.credentialProvider().credentialCache
Review Comment:
```suggestion
CredentialCache.Cache<ScramCredential> cache =
broker.credentialProvider().credentialCache
.cache(KAFKA_CLIENT_SASL_MECHANISM, ScramCredential.class);
```
--
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]