You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by da...@apache.org on 2025/09/22 03:55:13 UTC
(hudi) branch master updated: test: fix flink flaky test TestStreamReadMonitoringFunction#testCheckpointRestoreWithLimit (#13936)
This is an automated email from the ASF dual-hosted git repository.
danny0405 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git
The following commit(s) were added to refs/heads/master by this push:
new 2817ccf8a31f test: fix flink flaky test TestStreamReadMonitoringFunction#testCheckpointRestoreWithLimit (#13936)
2817ccf8a31f is described below
commit 2817ccf8a31f5046c6fc268fc44e7427bd77bea4
Author: Shuo Cheng <nj...@gmail.com>
AuthorDate: Mon Sep 22 11:55:06 2025 +0800
test: fix flink flaky test TestStreamReadMonitoringFunction#testCheckpointRestoreWithLimit (#13936)
---
.../java/org/apache/hudi/source/TestStreamReadMonitoringFunction.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hudi-flink-datasource/hudi-flink/src/test/java/org/apache/hudi/source/TestStreamReadMonitoringFunction.java b/hudi-flink-datasource/hudi-flink/src/test/java/org/apache/hudi/source/TestStreamReadMonitoringFunction.java
index c78292f4b45e..78ba30207353 100644
--- a/hudi-flink-datasource/hudi-flink/src/test/java/org/apache/hudi/source/TestStreamReadMonitoringFunction.java
+++ b/hudi-flink-datasource/hudi-flink/src/test/java/org/apache/hudi/source/TestStreamReadMonitoringFunction.java
@@ -466,6 +466,7 @@ public class TestStreamReadMonitoringFunction {
public void testCheckpointRestoreWithLimit() throws Exception {
TestData.writeData(TestData.DATA_SET_INSERT, conf);
conf.set(FlinkOptions.READ_SPLITS_LIMIT, 2);
+ conf.set(FlinkOptions.READ_STREAMING_CHECK_INTERVAL, 1);
StreamReadMonitoringFunction function = TestUtils.getMonitorFunc(conf);
OperatorSubtaskState state;
try (AbstractStreamOperatorTestHarness<MergeOnReadInputSplit> harness = createHarness(function)) {
@@ -478,7 +479,6 @@ public class TestStreamReadMonitoringFunction {
state = harness.snapshot(1, 1);
// Stop the stream task.
function.close();
- assertTrue(latch.await(WAIT_TIME_MILLIS, TimeUnit.MILLISECONDS), "Should finish splits generation");
assertThat("Should produce the expected splits", sourceContext.getPartitionPaths(), is("par1,par2"));
assertTrue(sourceContext.splits.stream().allMatch(split -> split.getInstantRange().isPresent()),
"All instants should have range limit");
@@ -493,11 +493,9 @@ public class TestStreamReadMonitoringFunction {
CountDownLatch latch = new CountDownLatch(6);
CollectingSourceContext sourceContext = new CollectingSourceContext(latch);
runAsync(sourceContext, function2);
- state = harness.snapshot(2, 1);
assertTrue(latch.await(WAIT_TIME_MILLIS, TimeUnit.MILLISECONDS), "Should finish splits generation");
// Stop the stream task.
function2.close();
- assertTrue(latch.await(WAIT_TIME_MILLIS, TimeUnit.MILLISECONDS), "Should finish splits generation");
assertThat("Should produce the expected splits", sourceContext.getPartitionPaths(), is("par1,par2,par3,par4"));
assertTrue(sourceContext.splits.stream().allMatch(split -> split.getInstantRange().isPresent()),
"All the instants should have range limit");