fapaul commented on code in PR #151:
URL: 
https://github.com/apache/flink-connector-kafka/pull/151#discussion_r1948857757


##########
flink-connector-kafka/src/test/java/org/apache/flink/connector/kafka/sink/KafkaSinkITCase.java:
##########
@@ -606,29 +682,21 @@ public void initializeState(FunctionInitializationContext 
context) throws Except
     private static final class InfiniteIntegerSource
             implements SourceFunction<Long>, CheckpointListener, 
CheckpointedFunction {

Review Comment:
   Nit: Does this source still need to be a `CheckpointedFunction`? Most of the 
logic moved to the mapper.



##########
flink-connector-kafka/src/test/java/org/apache/flink/connector/kafka/sink/KafkaWriterTestBase.java:
##########
@@ -227,6 +246,13 @@ public ProducerRecord<byte[], byte[]> serialize(
             }
             return new ProducerRecord<>(topic, 
ByteBuffer.allocate(4).putInt(element).array());
         }
+
+        @Override
+        public Optional<KafkaDatasetFacet> getKafkaDatasetFacet() {
+            return Optional.of(
+                    new DefaultKafkaDatasetFacet(
+                            
DefaultKafkaDatasetIdentifier.ofTopics(Arrays.asList(topic))));
+        }

Review Comment:
   Why was this necessary to add?



##########
flink-connector-kafka/src/test/java/org/apache/flink/connector/kafka/sink/KafkaSinkITCase.java:
##########
@@ -115,23 +126,20 @@ public class KafkaSinkITCase extends TestLogger {
     private static AdminClient admin;
 
     private String topic;
-    private SharedReference<AtomicLong> emittedRecordsCount;
-    private SharedReference<AtomicLong> emittedRecordsWithCheckpoint;
-    private SharedReference<AtomicBoolean> failed;
-    private SharedReference<AtomicLong> lastCheckpointedRecord;
 
-    @ClassRule
+    private static MiniClusterWithClientResource cluster;
+
+    @Container
     public static final KafkaContainer KAFKA_CONTAINER =
             createKafkaContainer(KafkaSinkITCase.class)
                     .withEmbeddedZookeeper()
                     .withNetwork(NETWORK)
                     .withNetworkAliases(INTER_CONTAINER_KAFKA_ALIAS);
 
-    @Rule public final SharedObjects sharedObjects = SharedObjects.create();
-
-    @Rule public final TemporaryFolder temp = new TemporaryFolder();
+    @RegisterExtension
+    public final SharedObjectsExtension sharedObjects = 
SharedObjectsExtension.create();
 
-    @BeforeClass
+    @BeforeAll

Review Comment:
   Are there ordering guarantees for multiple `@BeforeAll` `@AfterAll`? I would 
suggest to merge the functions to avoid any confusion.



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