Skip to content

Commit

Permalink
ducktape: run GroupMetricsTest with group_topic_partitions=1
Browse files Browse the repository at this point in the history
test_leadership_transfer relies on kafka_group_offset metric source as an
indication of the node being a group coordinator. However in admin API
there is no way to know which __consumer_groups partition a specific
consumer group uses, and the testcase always works with partition 0.
To make that work, number of __consumer_groups partition is set to 1
explicitly.
  • Loading branch information
dlex committed Jul 13, 2022
1 parent 8d29b9d commit 16128a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/rptest/tests/group_membership_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ def __init__(self, ctx, *args, **kwargs):

# Require internal_kafka topic to have an increased replication factor
extra_rp_conf = dict(default_topic_replications=3,
enable_leader_balancer=False)
enable_leader_balancer=False,
group_topic_partitions=1)
super(GroupMetricsTest, self).__init__(test_context=ctx,
num_brokers=3,
extra_rp_conf=extra_rp_conf)
Expand Down Expand Up @@ -374,6 +375,7 @@ def select_next_leader():
timeout_sec=30,
backoff_sec=5)

self.logger.debug(f"Waiting for metrics from the single node: {new_leader.account.hostname}")
wait_until(lambda: metrics_from_single_node(new_leader),
timeout_sec=30,
backoff_sec=5)
Expand Down

0 comments on commit 16128a4

Please sign in to comment.