CrynetLogistics commented on a change in pull request #18651:
URL: https://github.com/apache/flink/pull/18651#discussion_r816064365
##########
File path:
flink-connectors/flink-connector-base/src/test/java/org/apache/flink/connector/base/sink/writer/AsyncSinkWriterTest.java
##########
@@ -547,20 +560,22 @@ public void
prepareCommitFlushesInflightElementsIfFlushIsSetToFalse() throws Exc
AsyncSinkWriterImpl sink =
new AsyncSinkWriterImplBuilder()
.context(sinkInitContext)
- .maxBatchSize(3)
+ .maxBatchSize(4)
.maxBufferedRequests(10)
.simulateFailures(true)
.build();
- sink.write(String.valueOf(225)); // buffer :[225]
- sink.write(String.valueOf(0)); // buffer [225,0]
- sink.write(String.valueOf(1)); // buffer [225,0,1] -- flushing
- sink.write(String.valueOf(2)); // flushing -- request should have
[225,0,1], [225] fails,
- // buffer has [2]
- assertEquals(2, res.size());
+ sink.write(String.valueOf(225)); // buffer: [225]
+ sink.write(String.valueOf(0)); // buffer: [225, 0]
+ sink.write(String.valueOf(1)); // buffer: [225, 0, 1]
+ sink.write(String.valueOf(2)); // buffer: [225, 0, 1, 2] // flushing
next round
+ sink.write(String.valueOf(3)); // flushing, request is [225, 0, 1, 2],
[225] fails
+ sink.write(String.valueOf(4)); // buffer: [225, 3, 4]
+
+ assertEquals(4, res.size());
Review comment:
Thanks Fabian, I reworked this test case now, so that it more accurately
reflects what is being tested.
--
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]