showuon commented on code in PR #25373:
URL: https://github.com/apache/flink/pull/25373#discussion_r1917851499
##########
flink-state-backends/flink-statebackend-rocksdb/src/test/java/org/apache/flink/state/rocksdb/RocksDBWriteBatchWrapperTest.java:
##########
@@ -96,6 +101,11 @@ public void testAsyncCancellation() throws Exception {
// make sure that cancellation is triggered earlier than
periodic flush
// but allow some delay of cancellation propagation
assertThat(i).isLessThan(cancellationCheckInterval * 2);
+ if (i == 0) {
+ // make sure the registry is closed at least after the
first run, so that we
+ // can verify the cancellation check is validating
correctly.
+ cancellationRequestedFuture.join();
+ }
Review Comment:
In the original comment, it said: `allow some delay of cancellation
propagation`. It's the reason why this test is flaky, because we can't assure
how much time it'll take for the `cancellation propagation`. With the
`cancellationRequestedFuture.join();` here, we can make sure the `cancellation
propagation` is done at least after the first run, to make the test reliable.
--
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]