kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject [kafka] branch trunk updated: KAFKA-8430: unit test to make sure null `group.id` and valid `group.instance.id` are valid combo (#6830)
Date Tue, 28 May 2019 23:34:18 GMT
This is an automated email from the ASF dual-hosted git repository.

guozhang 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 051379e  KAFKA-8430: unit test to make sure null `group.id` and valid `group.instance.id`
are valid combo (#6830)
051379e is described below

commit 051379ea5df6b9906a8fd97cb41a0a6d584b8f03
Author: Boyang Chen <boyang@confluent.io>
AuthorDate: Tue May 28 16:34:03 2019 -0700

    KAFKA-8430: unit test to make sure null `group.id` and valid `group.instance.id` are valid
combo (#6830)
    
    As title suggests, this unit test is just a double check. No need to push in 2.3
    
    Reviewers: Guozhang Wang <wangguoz@gmail.com>, Matthias J. Sax <mjsax@apache.org>
---
 .../org/apache/kafka/clients/consumer/KafkaConsumerTest.java   | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java
b/clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java
index 8e6bd01..405ec68 100644
--- a/clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java
+++ b/clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java
@@ -211,6 +211,16 @@ public class KafkaConsumerTest {
     }
 
     @Test
+    public void shouldIgnoreGroupInstanceIdForEmptyGroupId() {
+        Map<String, Object> config = new HashMap<>();
+        config.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9999");
+        config.put(ConsumerConfig.GROUP_INSTANCE_ID_CONFIG, "instance_id");
+        KafkaConsumer<byte[], byte[]> consumer = new KafkaConsumer<>(
+                config, new ByteArrayDeserializer(), new ByteArrayDeserializer());
+        consumer.close();
+    }
+
+    @Test
     public void testSubscription() {
         KafkaConsumer<byte[], byte[]> consumer = newConsumer(groupId);
 


Mime
View raw message