pnowojski commented on code in PR #24014:
URL: https://github.com/apache/flink/pull/24014#discussion_r1452511845
##########
flink-connectors/flink-connector-base/src/test/java/org/apache/flink/connector/base/sink/writer/AsyncSinkWriterTest.java:
##########
@@ -112,16 +112,20 @@ public void checkLoggedSendTimesAreWithinBounds() throws
IOException, Interrupte
AsyncSinkWriterImpl sink =
new AsyncSinkWriterImplBuilder()
.context(sinkInitContext)
- .maxBatchSize(4)
- .delay(100)
+ .maxBatchSize(2)
+ .delay(50)
.build();
- for (int i = 0; i < 4; i++) {
- sink.write(String.valueOf(i));
- }
+ sink.write(String.valueOf(1));
+ // introduce artificial delay, shouldn't be calculated in send time
+ Thread.sleep(50);
Review Comment:
This doesn't look correct. Can you elaborate why do we need this? Why
`sink.flush()` is not waiting for any async things to complete? It looks like
actually might be a bug in production code if we have to add `Thread.sleep(x)`
to test this.
--
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]