fapaul commented on a change in pull request #17286:
URL: https://github.com/apache/flink/pull/17286#discussion_r709284196



##########
File path: 
flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/KafkaChangelogTableITCase.java
##########
@@ -369,14 +380,19 @@ public void testKafkaMaxwellChangelogSource() throws 
Exception {
         Properties producerProperties = getStandardProps();
         producerProperties.setProperty("retries", "0");
         try {
-            stream.addSink(
-                    new FlinkKafkaProducer<>(
-                            topic,
-                            serSchema,
-                            producerProperties,
-                            partitioner,
-                            EXACTLY_ONCE,
-                            DEFAULT_KAFKA_PRODUCERS_POOL_SIZE));
+            stream.sinkTo(
+                    KafkaSink.<String>builder()
+                            .setBootstrapServers(
+                                    producerProperties.getProperty(
+                                            
ProducerConfig.BOOTSTRAP_SERVERS_CONFIG))
+                            .setRecordSerializer(
+                                    KafkaRecordSerializationSchema.builder()
+                                            .setTopic(topic)
+                                            
.setValueSerializationSchema(serSchema)
+                                            .setPartitioner(partitioner)
+                                            .build())
+                            
.setDeliverGuarantee(DeliveryGuarantee.EXACTLY_ONCE)
+                            .build());

Review comment:
       Unfortunately, the tests are not in great shape I now pulled the sink 
setup into a separate method but there is still some duplication for the 
overall testup. I'd leave this for another time ;) 




-- 
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]


Reply via email to