-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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-17258: Migrate AdminFenceProducersIntegrationTest to ClusterTestExtensions framework #17311
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mingyen066, Thanks for your PR, left some comments, PTAL
core/src/test/java/kafka/admin/AdminFenceProducersIntegrationTest.java
Outdated
Show resolved
Hide resolved
core/src/test/java/kafka/admin/AdminFenceProducersIntegrationTest.java
Outdated
Show resolved
Hide resolved
core/src/test/java/kafka/admin/AdminFenceProducersIntegrationTest.java
Outdated
Show resolved
Hide resolved
core/src/test/java/kafka/admin/AdminFenceProducersIntegrationTest.java
Outdated
Show resolved
Hide resolved
core/src/test/java/kafka/admin/AdminFenceProducersIntegrationTest.java
Outdated
Show resolved
Hide resolved
core/src/test/java/kafka/admin/AdminFenceProducersIntegrationTest.java
Outdated
Show resolved
Hide resolved
core/src/test/java/kafka/admin/AdminFenceProducersIntegrationTest.java
Outdated
Show resolved
Hide resolved
core/src/test/java/kafka/admin/AdminFenceProducersIntegrationTest.java
Outdated
Show resolved
Hide resolved
core/src/test/java/kafka/admin/AdminFenceProducersIntegrationTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mingyen066 thanks for your patch
core/src/test/java/kafka/admin/AdminFenceProducersIntegrationTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@mingyen066 please fix build error |
e40aaa0
to
2d8b370
Compare
Thanks for reviewing! The build error has been fixed. |
private KafkaProducer<byte[], byte[]> createProducer() { | ||
Properties config = new Properties(); | ||
config.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, clusterInstance.bootstrapServers()); | ||
config.put(ProducerConfig.TRANSACTIONAL_ID_CONFIG, TXN_ID); | ||
config.put(ProducerConfig.TRANSACTION_TIMEOUT_CONFIG, "2000"); | ||
config.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, ByteArraySerializer.class.getName()); | ||
config.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, ByteArraySerializer.class.getName()); | ||
|
||
return new KafkaProducer<>(config); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just discovered that this can be cleaned up with cluster.producer(configs)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, you are right. Please feel free to open a MINOR to refactor it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. #18197. PTAL. Thanks!
…Extensions framework (apache#17311) Reviewers: Ken Huang <[email protected]>, Chia-Ping Tsai <[email protected]>
AdminFenceProducersIntegrationTest
from scala to java and withClusterTestExtensions
frameworkCommitter Checklist (excluded from commit message)