chia7712 commented on code in PR #15679:
URL: https://github.com/apache/kafka/pull/15679#discussion_r1576508031
##########
tools/src/test/java/org/apache/kafka/tools/consumer/group/DeleteOffsetsConsumerGroupCommandIntegrationTest.java:
##########
@@ -42,109 +58,141 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
-public class DeleteOffsetsConsumerGroupCommandIntegrationTest extends
ConsumerGroupCommandTest {
- String[] getArgs(String group, String topic) {
- return new String[] {
- "--bootstrap-server", bootstrapServers(listenerName()),
- "--delete-offsets",
- "--group", group,
- "--topic", topic
- };
+@Tag("integration")
+@ClusterTestDefaults(clusterType = Type.ALL, serverProperties = {
+ @ClusterConfigProperty(key =
GroupCoordinatorConfig.OFFSETS_TOPIC_PARTITIONS_CONFIG, value = "1"),
+ @ClusterConfigProperty(key =
GroupCoordinatorConfig.OFFSETS_TOPIC_REPLICATION_FACTOR_CONFIG, value = "1"),
+ @ClusterConfigProperty(key = "group.coordinator.new.enable", value =
"true")
+})
+@ExtendWith(ClusterTestExtensions.class)
+public class DeleteOffsetsConsumerGroupCommandIntegrationTest {
+ public static final String TOPIC = "foo";
+ public static final String GROUP = "test.group";
+ private final ClusterInstance clusterInstance;
+
+ private ConsumerGroupCommand.ConsumerGroupService consumerGroupService;
+ private final Iterable<Map<String, Object>> consumerConfigs;
+
+ DeleteOffsetsConsumerGroupCommandIntegrationTest(ClusterInstance
clusterInstance) {
+ this.clusterInstance = clusterInstance;
+ this.consumerConfigs = clusterInstance.isKRaftTest()
+ ? Arrays.asList(
+ new HashMap<String, Object>() {{
Review Comment:
We can use immutable map and make `createConsumer` create a inner mutable
map to collect all configs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]