Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,18 @@ public void testInvalidSocketReceiveBufferSize() {
new KafkaConsumer<>(config, new ByteArrayDeserializer(), new ByteArrayDeserializer());
}

@Test
public void testInitSuccessWithDefaultNullGroupIdAndValidGroupInstanceId() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: shouldIgnoreGroupInstanceIdForEmptyGroupId

Map<String, Object> config = new HashMap<>();
config.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9999");
config.put(ConsumerConfig.SEND_BUFFER_CONFIG, Selectable.USE_DEFAULT_BUFFER_SIZE);
config.put(ConsumerConfig.RECEIVE_BUFFER_CONFIG, Selectable.USE_DEFAULT_BUFFER_SIZE);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to set SEND_BUFFER_CONFIG and RECEIVE_BUFFER_CONFIG ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No we don't lol

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);
Expand Down