From 47781b060229589d246ddd3367faf9240d9df695 Mon Sep 17 00:00:00 2001 From: ConradJam Date: Wed, 28 Aug 2024 14:16:50 +0800 Subject: [PATCH] fix up tests error with attempts --- .../apache/amoro/flink/read/TestMixedFormatSource.java | 9 +++++---- .../v3.2/amoro-mixed-format-spark-3.2/pom.xml | 0 2 files changed, 5 insertions(+), 4 deletions(-) delete mode 100644 amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/pom.xml diff --git a/amoro-mixed-format/amoro-mixed-format-flink/amoro-mixed-format-flink-common/src/test/java/org/apache/amoro/flink/read/TestMixedFormatSource.java b/amoro-mixed-format/amoro-mixed-format-flink/amoro-mixed-format-flink-common/src/test/java/org/apache/amoro/flink/read/TestMixedFormatSource.java index ecdf4c47e9..5ba76d4475 100644 --- a/amoro-mixed-format/amoro-mixed-format-flink/amoro-mixed-format-flink-common/src/test/java/org/apache/amoro/flink/read/TestMixedFormatSource.java +++ b/amoro-mixed-format/amoro-mixed-format-flink/amoro-mixed-format-flink-common/src/test/java/org/apache/amoro/flink/read/TestMixedFormatSource.java @@ -234,6 +234,7 @@ public void testMixedFormatSource(FailoverType failoverType) throws Exception { @Test public void testDimTaskManagerFailover() throws Exception { + int restartAttempts = 10; List updated = updateRecords(); writeUpdate(updated); List records = generateRecords(2, 1); @@ -242,8 +243,8 @@ public void testDimTaskManagerFailover() throws Exception { MixedFormatSource mixedFormatSource = initMixedFormatDimSource(true); StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); // enable checkpoint - env.enableCheckpointing(1000); - env.setRestartStrategy(RestartStrategies.fixedDelayRestart(10, 0)); + env.enableCheckpointing(3000); + env.setRestartStrategy(RestartStrategies.fixedDelayRestart(restartAttempts, 0)); DataStream input = env.fromSource( @@ -262,8 +263,8 @@ public void testDimTaskManagerFailover() throws Exception { WatermarkAwareFailWrapper::continueProcessing, miniClusterResource.getMiniCluster()); - while (WatermarkAwareFailWrapper.watermarkCounter.get() != PARALLELISM) { - Thread.sleep(1000); + while (WatermarkAwareFailWrapper.watermarkCounter.get() != restartAttempts) { + Thread.sleep(2000); LOG.info("wait for watermark after failover"); } Assert.assertEquals(Long.MAX_VALUE, WatermarkAwareFailWrapper.getWatermarkAfterFailover()); diff --git a/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/pom.xml b/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/pom.xml deleted file mode 100644 index e69de29bb2..0000000000