Skip to content

KAFKA-18527: SaslClientsWithInvalidCredentialsTest.java should run for async consumer#18609

Closed
frankvicky wants to merge 1 commit intoapache:trunkfrom
frankvicky:KAFKA-18527-1
Closed

KAFKA-18527: SaslClientsWithInvalidCredentialsTest.java should run for async consumer#18609
frankvicky wants to merge 1 commit intoapache:trunkfrom
frankvicky:KAFKA-18527-1

Conversation

@frankvicky
Copy link
Copy Markdown
Contributor

JIRA: KAFKA-18527

Enable new consumer protocol for SaslClientsWithInvalidCredentialsTest.java

Since SaslClientsWithInvalidCredentialsTest.scala has some issues when enabling new consumer protocol, I decide to open a PR for java first.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@github-actions github-actions Bot added triage PRs from the community tools tests Test fixes (including flaky tests) small Small PRs labels Jan 18, 2025
…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.
Copy link
Copy Markdown
Contributor

@kirktrue kirktrue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 137 states that we can't use TestInfoUtils.TestWithParameterizedQuorumName() in the @ParameterizedTest annotation. Does it make sense to add that here, too?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I'm not very sure about this one 🤔

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@frankvicky Could you please add the following comment to this test case?

// NOTE: Not able to refer TestInfoUtils#TestWithParameterizedQuorumName() in the ParameterizedTest name.

@github-actions github-actions Bot removed the triage PRs from the community label Jan 22, 2025
@kirktrue
Copy link
Copy Markdown
Contributor

@lianetm—would you review? Thanks!

Copy link
Copy Markdown
Member

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@frankvicky
Copy link
Copy Markdown
Contributor Author

This issue will fixed by #18668

@frankvicky frankvicky closed this Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-approved small Small PRs tests Test fixes (including flaky tests) tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants