KAFKA-18527: SaslClientsWithInvalidCredentialsTest.java should run for async consumer#18609
KAFKA-18527: SaslClientsWithInvalidCredentialsTest.java should run for async consumer#18609frankvicky wants to merge 1 commit intoapache:trunkfrom
Conversation
…r async consumer JIRA: KAFKA-18527 Enable new consumer protocol for SaslClientsWithInvalidCredentialsTest.java. Since SaslClientsWithInvalidCredentialsTest.scala has some issues are still handled, I decide to open a PR for java first.
472f995 to
309fb32
Compare
kirktrue
left a comment
There was a problem hiding this comment.
LGTM. The tests are passing with the change, is there anything else that needs to be done before a committer can review? Thanks!
| @@ -149,7 +149,7 @@ public void testConsumerGroupServiceWithAuthenticationFailure(String quorum, Str | |||
| } | |||
|
|
|||
| @ParameterizedTest(name = "{displayName}.quorum={0}.groupProtocol={1}") | |||
There was a problem hiding this comment.
Line 137 states that we can't use TestInfoUtils.TestWithParameterizedQuorumName() in the @ParameterizedTest annotation. Does it make sense to add that here, too?
There was a problem hiding this comment.
Interesting, I'm not very sure about this one 🤔
There was a problem hiding this comment.
@frankvicky Could you please add the following comment to this test case?
// NOTE: Not able to refer TestInfoUtils#TestWithParameterizedQuorumName() in the ParameterizedTest name.
|
@lianetm—would you review? Thanks! |
chia7712
left a comment
There was a problem hiding this comment.
@frankvicky thanks for the patch! I've got two small things to point out.
| @MethodSource("getTestQuorumAndGroupProtocolParametersClassicGroupProtocolOnly") | ||
| @MethodSource("getTestQuorumAndGroupProtocolParametersAll") | ||
| public void testConsumerGroupServiceWithAuthenticationFailure(String quorum, String groupProtocol) throws Exception { | ||
| ConsumerGroupCommand.ConsumerGroupService consumerGroupService = prepareConsumerGroupService(); |
There was a problem hiding this comment.
As we are modifying this PR, could you please close consumerGroupService via try-release also? For example:
try (ConsumerGroupCommand.ConsumerGroupService consumerGroupService = prepareConsumerGroupService();
Consumer<byte[], byte[]> consumer = createConsumer()) {
consumer.subscribe(Collections.singletonList(TOPIC));
verifyAuthenticationException(consumerGroupService::listGroups);
}| @MethodSource("getTestQuorumAndGroupProtocolParametersAll") | ||
| public void testConsumerGroupServiceWithAuthenticationSuccess(String quorum, String groupProtocol) throws Exception { | ||
| createScramCredentialsViaPrivilegedAdminClient(JaasTestUtils.KAFKA_SCRAM_USER_2, JaasTestUtils.KAFKA_SCRAM_PASSWORD_2); | ||
| ConsumerGroupCommand.ConsumerGroupService consumerGroupService = prepareConsumerGroupService(); |
|
This issue will fixed by #18668 |
JIRA: KAFKA-18527
Enable new consumer protocol for
SaslClientsWithInvalidCredentialsTest.javaSince
SaslClientsWithInvalidCredentialsTest.scalahas some issues when enabling new consumer protocol, I decide to open a PR for java first.Committer Checklist (excluded from commit message)