Skip to content

Commit cf5d24e

Browse files
authored
[hotfix] Fix unstable testUnionReadLogTableFailover test (#1680)
1 parent 4c2ddc3 commit cf5d24e

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

fluss-lake/fluss-lake-paimon/src/test/java/org/apache/fluss/lake/paimon/flink/FlinkUnionReadLogTableITCase.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949

5050
import static org.apache.fluss.flink.source.testutils.FlinkRowAssertionsUtils.assertResultsExactOrder;
5151
import static org.apache.fluss.flink.source.testutils.FlinkRowAssertionsUtils.assertResultsIgnoreOrder;
52+
import static org.apache.fluss.flink.source.testutils.FlinkRowAssertionsUtils.assertRowResultsIgnoreOrder;
5253
import static org.apache.fluss.testutils.DataTestUtils.row;
5354
import static org.assertj.core.api.Assertions.assertThat;
5455

@@ -205,7 +206,11 @@ void testUnionReadLogTableFailover(boolean isPartitioned) throws Exception {
205206

206207
CloseableIterator<Row> actual =
207208
streamTEnv.executeSql("select * from " + resultTableName).collect();
208-
assertResultsExactOrder(actual, writtenRows, false);
209+
if (isPartitioned) {
210+
assertRowResultsIgnoreOrder(actual, writtenRows, false);
211+
} else {
212+
assertResultsExactOrder(actual, writtenRows, false);
213+
}
209214

210215
// now, stop the job with save point
211216
String savepointPath =
@@ -226,8 +231,11 @@ void testUnionReadLogTableFailover(boolean isPartitioned) throws Exception {
226231

227232
// write some log data again
228233
List<Row> rows = writeRows(table1, 3, isPartitioned);
229-
230-
assertResultsExactOrder(actual, rows, true);
234+
if (isPartitioned) {
235+
assertRowResultsIgnoreOrder(actual, rows, true);
236+
} else {
237+
assertResultsExactOrder(actual, rows, true);
238+
}
231239

232240
// cancel jobs
233241
insertResult.getJobClient().get().cancel().get();

0 commit comments

Comments
 (0)