Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KAFKA-18075: Prevent ClusterInstance default producer and consumer initialization with empty configs #17926

Merged
merged 1 commit into from
Nov 24, 2024

Conversation

brandboat
Copy link
Member

related to KAFKA-18075

In ClusterInstance.java

[0]

default <K, V> Consumer<K, V> consumer() {
    return new KafkaConsumer<>(Map.of());
}

[1] 

default <K, V> Producer<K, V> producer() {
    return new KafkaProducer<>(Map.of());
} 

should return consumer(Map.of()) and producer(Map.of()) in the same class instead of return empty properties.

[0] https://github.com/apache/kafka/blob/trunk/test-common/test-common-api/src/main/java/org/apache/kafka/common/test/api/ClusterInstance.java#L168
[1] https://github.com/apache/kafka/blob/trunk/test-common/test-common-api/src/main/java/org/apache/kafka/common/test/api/ClusterInstance.java#L182
 

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@github-actions github-actions bot added tests Test fixes (including flaky tests) small Small PRs labels Nov 23, 2024
@brandboat
Copy link
Member Author

Test passed except testJMXFilter, which is not related to this pr, tracked in https://issues.apache.org/jira/browse/KAFKA-18078

@chia7712 chia7712 merged commit 5ad532f into apache:trunk Nov 24, 2024
6 of 8 checks passed
@brandboat brandboat deleted the KAFKA-18075 branch November 24, 2024 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
small Small PRs tests Test fixes (including flaky tests)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants