You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by gu...@apache.org on 2019/05/28 23:34:18 UTC
[kafka] branch trunk updated: KAFKA-8430: unit test to make sure
null `group.id` and valid `group.instance.id` are valid combo (#6830)
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 <bo...@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 <wa...@gmail.com>, Matthias J. Sax <mj...@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);