You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ch...@apache.org on 2026/10/14 19:57:20 UTC

(kafka) branch trunk updated: MINOR: Limit ConsoleConsumerTest to KRaft mode only (#23690)

This is an automated email from the ASF dual-hosted git repository.

chia7712 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new ca08bdc233e MINOR: Limit ConsoleConsumerTest to KRaft mode only (#23690)
ca08bdc233e is described below

commit ca08bdc233e04c0786834771585c1f90d4eb4f2b
Author: hysu <da...@gmail.com>
AuthorDate: Wed Oct 14 12:57:13 2026 -0700

    MINOR: Limit ConsoleConsumerTest to KRaft mode only (#23690)
    
    Follow-up to #23684. The `@ClusterTest` methods in `ConsoleConsumerTest`
    do not depend on the controller deployment mode, so running them in both
    `KRAFT` and `CO_KRAFT` is redundant. This patch restricts the class to
    `Type.KRAFT` via `@ClusterTestDefaults`.
    
    Reviewers: Andy Huang <ky...@gmail.com>, Ken Huang
    <s7...@gmail.com>, Chia-Ping Tsai <ch...@gmail.com>
---
 .../test/java/org/apache/kafka/tools/consumer/ConsoleConsumerTest.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/src/test/java/org/apache/kafka/tools/consumer/ConsoleConsumerTest.java b/tools/src/test/java/org/apache/kafka/tools/consumer/ConsoleConsumerTest.java
index ca5874b092c..d29b97dd9e7 100644
--- a/tools/src/test/java/org/apache/kafka/tools/consumer/ConsoleConsumerTest.java
+++ b/tools/src/test/java/org/apache/kafka/tools/consumer/ConsoleConsumerTest.java
@@ -35,6 +35,8 @@ import org.apache.kafka.common.serialization.ByteArraySerializer;
 import org.apache.kafka.common.test.ClusterInstance;
 import org.apache.kafka.common.test.api.ClusterConfigProperty;
 import org.apache.kafka.common.test.api.ClusterTest;
+import org.apache.kafka.common.test.api.ClusterTestDefaults;
+import org.apache.kafka.common.test.api.Type;
 import org.apache.kafka.common.utils.Time;
 import org.apache.kafka.coordinator.group.generated.ConsumerGroupMemberMetadataKey;
 import org.apache.kafka.coordinator.group.generated.ConsumerGroupMemberMetadataKeyJsonConverter;
@@ -99,6 +101,7 @@ import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
+@ClusterTestDefaults(types = {Type.KRAFT})
 public class ConsoleConsumerTest {
 
     private final String topic = "test-topic";