Skip to content

Commit ccca87b

Browse files
m1a2sttedyu
authored andcommitted
KAFKA-17472 Speed Up DescribeConsumerGroupTest (apache#17117)
Reviewers: Chia-Ping Tsai <[email protected]>
1 parent 66ab89c commit ccca87b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tools/src/test/java/org/apache/kafka/tools/consumer/group/ConsumerGroupCommandTestUtils.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242

4343
import static kafka.test.annotation.Type.CO_KRAFT;
4444
import static kafka.test.annotation.Type.ZK;
45+
import static org.apache.kafka.coordinator.group.GroupCoordinatorConfig.CONSUMER_GROUP_HEARTBEAT_INTERVAL_MS_CONFIG;
46+
import static org.apache.kafka.coordinator.group.GroupCoordinatorConfig.CONSUMER_GROUP_MIN_HEARTBEAT_INTERVAL_MS_CONFIG;
47+
import static org.apache.kafka.coordinator.group.GroupCoordinatorConfig.GROUP_INITIAL_REBALANCE_DELAY_MS_CONFIG;
4548
import static org.apache.kafka.coordinator.group.GroupCoordinatorConfig.OFFSETS_TOPIC_PARTITIONS_CONFIG;
4649
import static org.apache.kafka.coordinator.group.GroupCoordinatorConfig.OFFSETS_TOPIC_REPLICATION_FACTOR_CONFIG;
4750

@@ -85,6 +88,9 @@ static List<ClusterConfig> forKRaftGroupCoordinator() {
8588
Map<String, String> serverProperties = new HashMap<>();
8689
serverProperties.put(OFFSETS_TOPIC_PARTITIONS_CONFIG, "1");
8790
serverProperties.put(OFFSETS_TOPIC_REPLICATION_FACTOR_CONFIG, "1");
91+
serverProperties.put(GROUP_INITIAL_REBALANCE_DELAY_MS_CONFIG, "1000");
92+
serverProperties.put(CONSUMER_GROUP_HEARTBEAT_INTERVAL_MS_CONFIG, "500");
93+
serverProperties.put(CONSUMER_GROUP_MIN_HEARTBEAT_INTERVAL_MS_CONFIG, "500");
8894

8995
return Collections.singletonList(ClusterConfig.defaultBuilder()
9096
.setTypes(Collections.singleton(CO_KRAFT))
@@ -97,6 +103,9 @@ static List<ClusterConfig> forZkGroupCoordinator() {
97103
Map<String, String> serverProperties = new HashMap<>();
98104
serverProperties.put(OFFSETS_TOPIC_PARTITIONS_CONFIG, "1");
99105
serverProperties.put(OFFSETS_TOPIC_REPLICATION_FACTOR_CONFIG, "1");
106+
serverProperties.put(GROUP_INITIAL_REBALANCE_DELAY_MS_CONFIG, "1000");
107+
serverProperties.put(CONSUMER_GROUP_HEARTBEAT_INTERVAL_MS_CONFIG, "500");
108+
serverProperties.put(CONSUMER_GROUP_MIN_HEARTBEAT_INTERVAL_MS_CONFIG, "500");
100109

101110
return Collections.singletonList(ClusterConfig.defaultBuilder()
102111
.setTypes(Collections.singleton(ZK))

0 commit comments

Comments
 (0)