hlteoh37 commented on code in PR #26274:
URL: https://github.com/apache/flink/pull/26274#discussion_r2027533856
##########
flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/sink/writer/AsyncSinkWriter.java:
##########
@@ -545,4 +550,14 @@ public void timeout() {
}
}
}
+
+ @VisibleForTesting
+ RequestBuffer<RequestEntryT> getBufferedRequestEntries() {
+ return bufferedRequestEntries;
+ }
+
+ @VisibleForTesting
+ BatchCreator<RequestEntryT> getBatchCreator() {
+ return batchCreator;
+ }
Review Comment:
Hmm yeah if this is for the default case, I don't think its that valuable to
test that we set default class type. Would prefer a more tidy Public interface!
However, the test you wrote are useful to test implementation of
AsyncSinkWriter. Maybe create a CapturingRequestBuffer and BatchCreator and
pass it into the constructor to test!
See example:
https://github.com/apache/flink-connector-aws/blob/main/flink-connector-aws/flink-connector-aws-kinesis-streams/src/test/java/org/apache/flink/connector/kinesis/source/util/KinesisAsyncClientProvider.java
--
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]