Savonitar commented on code in PR #332:
URL:
https://github.com/apache/flink-connector-kafka/pull/332#discussion_r4209649421
##########
flink-connector-kafka/src/test/java/org/apache/flink/connector/kafka/sink/ExactlyOnceKafkaWriterITCase.java:
##########
@@ -374,6 +378,40 @@ void testAbortOnClose() throws Exception {
}
}
+ /**
+ * Tests that POOLING releases its admin client and INCREMENTING closes
without creating one.
+ */
+ @ParameterizedTest
+ @EnumSource(TransactionNamingStrategy.class)
+ void testCloseReleasesAdminClient(TransactionNamingStrategy
namingStrategy) throws Exception {
+ final String clientId = "test-close-admin-client-" + UUID.randomUUID();
+ final List<Thread> adminThreads;
+ try (final KafkaWriter<Integer> writer =
+ createWriter(
+ builder ->
+
builder.setDeliveryGuarantee(DeliveryGuarantee.EXACTLY_ONCE)
+
.setTransactionNamingStrategy(namingStrategy)
+
.setProperty(ProducerConfig.CLIENT_ID_CONFIG, clientId),
+ createInitContext())) {
+ adminThreads =
Review Comment:
good idea, addressed in a separate commit (not squashed for review
convenience).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]