From 2e65cc50b7f6a66fd33ba328d6cb1712d1316763 Mon Sep 17 00:00:00 2001 From: YeJunHao <41894543+leaves12138@users.noreply.github.com> Date: Tue, 26 Mar 2024 12:06:45 +0800 Subject: [PATCH] [test] Append only table can't test failing IO re-insert yet (#3089) --- .../paimon/flink/UnawareBucketAppendOnlyTableITCase.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/UnawareBucketAppendOnlyTableITCase.java b/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/UnawareBucketAppendOnlyTableITCase.java index a99997a00e9c..d428bd29a4aa 100644 --- a/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/UnawareBucketAppendOnlyTableITCase.java +++ b/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/UnawareBucketAppendOnlyTableITCase.java @@ -242,6 +242,7 @@ public void testTimestampLzType() { .toInstant())); } + // test is not correct, append table may insert twice if always retry when file io fails @Test public void testReadWriteFailRandom() throws Exception { setFailRate(100, 1000); @@ -265,7 +266,7 @@ public void testReadWriteFailRandom() throws Exception { () -> { batchSql("SELECT * FROM append_table"); List rows = batchSql("SELECT * FROM append_table"); - assertThat(rows.size()).isEqualTo(size); + assertThat(rows.size()).isGreaterThanOrEqualTo(size); assertThat(rows).containsExactlyInAnyOrder(results.toArray(new Row[0])); }); } @@ -294,7 +295,7 @@ public void testReadWriteFailRandomString() throws Exception { () -> { batchSql("SELECT * FROM append_table"); List rows = batchSql("SELECT * FROM append_table"); - assertThat(rows.size()).isEqualTo(size); + assertThat(rows.size()).isGreaterThanOrEqualTo(size); assertThat(rows).containsExactlyInAnyOrder(results.toArray(new Row[0])); }); }