This is an automated email from the ASF dual-hosted git repository. MartijnVisser pushed a commit to branch release-2.2 in repository https://gitbox.apache.org/repos/asf/flink.git
commit 17d3f2717fad8146d62e474adfbfaf811d1b72de Author: Yuepeng Pan <[email protected]> AuthorDate: Sun Jun 14 10:16:59 2026 +0800 [FLINK-39922][runtime/test] Fix the flaky test case AbstractAsyncRunnableStreamOperatorTest#testCheckpointDrain (#28425) (cherry picked from commit 6d106cda908ab1e126619e4898371b0bb9e1c393) --- .../operators/AbstractAsyncRunnableStreamOperatorTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/asyncprocessing/operators/AbstractAsyncRunnableStreamOperatorTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/asyncprocessing/operators/AbstractAsyncRunnableStreamOperatorTest.java index dedf01de245..b073f6cbed1 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/asyncprocessing/operators/AbstractAsyncRunnableStreamOperatorTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/asyncprocessing/operators/AbstractAsyncRunnableStreamOperatorTest.java @@ -241,17 +241,20 @@ public class AbstractAsyncRunnableStreamOperatorTest { (SimpleAsyncExecutionController) ((AbstractAsyncRunnableStreamOperator) testHarness.getOperator()) .getAsyncExecutionController(); + CompletableFuture<Void> unblockAsyncRequest = new CompletableFuture<>(); ((AbstractAsyncRunnableStreamOperator<String>) testHarness.getOperator()) .setAsyncKeyedContextElement( new StreamRecord<>(Tuple2.of(5, "5")), new TestKeySelector()); ((AbstractAsyncRunnableStreamOperator<String>) testHarness.getOperator()) .asyncProcess( () -> { + unblockAsyncRequest.get(10, TimeUnit.SECONDS); return null; }); ((AbstractAsyncRunnableStreamOperator<String>) testHarness.getOperator()) .postProcessElement(); assertThat(asyncExecutionController.getInFlightRecordNum()).isEqualTo(1); + unblockAsyncRequest.complete(null); testHarness.drainAsyncRequests(); assertThat(asyncExecutionController.getInFlightRecordNum()).isEqualTo(0); }
