Skip to content

[KIP-848] Tests for changes in DescribeConsumerGroups #1984

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

PratRanj07
Copy link
Contributor

Modified test for changes in DescribeConsumerGroups api

@Copilot Copilot AI review requested due to automatic review settings May 26, 2025 09:47
@PratRanj07 PratRanj07 requested review from a team as code owners May 26, 2025 09:47
@confluent-cla-assistant
Copy link

🎉 All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Tests for the DescribeConsumerGroups API have been updated to handle and verify the new ConsumerGroupType field for both classic and consumer protocols, and obsolete skip logic has been removed.

  • Added ConsumerGroupType import and updated consume_messages to accept a group_protocol parameter.
  • Expanded verify_describe_groups to assert desc.type for both classic and consumer group protocols.
  • Removed the conditional skip for consumer protocol tests.

'enable.auto.commit': False,
'on_commit': verify_commit_result,
'auto.offset.reset': 'earliest'}

if group_protocol == 'classic' :
Copy link
Preview

Copilot AI May 26, 2025

Choose a reason for hiding this comment

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

Remove the extra space before the colon in the if statement to follow style guidelines (e.g., PEP8).

Suggested change
if group_protocol == 'classic' :
if group_protocol == 'classic':

Copilot uses AI. Check for mistakes.


# Delete group
perform_admin_operation_sync(admin_client.delete_consumer_groups, [group], request_timeout=10)

consumer_group = 'test-group-consumer'
Copy link
Preview

Copilot AI May 26, 2025

Choose a reason for hiding this comment

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

[nitpick] The test logic for classic and consumer group protocols is nearly identical; consider refactoring into a parameterized helper or loop to reduce duplication.

Copilot uses AI. Check for mistakes.


# Delete group
perform_admin_operation_sync(admin_client.delete_consumer_groups, [group], request_timeout=10)

consumer_group = 'test-group-consumer'
Copy link
Preview

Copilot AI May 26, 2025

Choose a reason for hiding this comment

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

There are trailing spaces at the end of this line; consider removing them to clean up formatting.

Suggested change
consumer_group = 'test-group-consumer'
consumer_group = 'test-group-consumer'

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant