Skip to content

Commit

Permalink
[FLINK-27756] Setting batches to one and extending sending margin in …
Browse files Browse the repository at this point in the history
…checkLoggedSendTimesAreWithinBounds test.
  • Loading branch information
vahmed-hamdy authored and dannycranmer committed Jun 13, 2022
1 parent a70e704 commit ceb285e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,16 @@ public void checkLoggedSendTimesAreWithinBounds() throws IOException, Interrupte
AsyncSinkWriterImpl sink =
new AsyncSinkWriterImplBuilder()
.context(sinkInitContext)
.maxBatchSize(2)
.maxBatchSize(4)
.delay(100)
.build();
for (int i = 0; i < 4; i++) {
sink.write(String.valueOf(i));
}

sink.flush(true);
assertThat(sinkInitContext.getCurrentSendTimeGauge().get().getValue())
.isGreaterThanOrEqualTo(99);
assertThat(sinkInitContext.getCurrentSendTimeGauge().get().getValue()).isLessThan(110);
assertThat(sinkInitContext.getCurrentSendTimeGauge().get().getValue()).isLessThan(120);
}

@Test
Expand Down

0 comments on commit ceb285e

Please sign in to comment.