Skip to content

Commit

Permalink
[test] Append only table can't test failing IO re-insert yet (apache#…
Browse files Browse the repository at this point in the history
  • Loading branch information
leaves12138 authored and zhuangchong committed Mar 26, 2024
1 parent 8372415 commit ea91033
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -265,7 +266,7 @@ public void testReadWriteFailRandom() throws Exception {
() -> {
batchSql("SELECT * FROM append_table");
List<Row> rows = batchSql("SELECT * FROM append_table");
assertThat(rows.size()).isEqualTo(size);
assertThat(rows.size()).isGreaterThanOrEqualTo(size);
assertThat(rows).containsExactlyInAnyOrder(results.toArray(new Row[0]));
});
}
Expand Down Expand Up @@ -294,7 +295,7 @@ public void testReadWriteFailRandomString() throws Exception {
() -> {
batchSql("SELECT * FROM append_table");
List<Row> rows = batchSql("SELECT * FROM append_table");
assertThat(rows.size()).isEqualTo(size);
assertThat(rows.size()).isGreaterThanOrEqualTo(size);
assertThat(rows).containsExactlyInAnyOrder(results.toArray(new Row[0]));
});
}
Expand Down

0 comments on commit ea91033

Please sign in to comment.