Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
JingsongLi committed Apr 12, 2024
1 parent 73d68e6 commit 31a8c19
Showing 1 changed file with 19 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ public void testPartitioned() throws Exception {
env.execute();

// read
List<Row> results = executeAndCollect(new FlinkSourceBuilder(table).env(env).build());
List<Row> results =
executeAndCollect(
new FlinkSourceBuilder(table).sourceBounded(true).env(env).build());

// assert
Row[] expected =
Expand All @@ -202,7 +204,9 @@ public void testNonPartitioned() throws Exception {
env.execute();

// read
List<Row> results = executeAndCollect(new FlinkSourceBuilder(table).env(env).build());
List<Row> results =
executeAndCollect(
new FlinkSourceBuilder(table).sourceBounded(true).env(env).build());

// assert
Row[] expected = new Row[] {Row.of(5, "p2", 1), Row.of(0, "p1", 2), Row.of(3, "p2", 5)};
Expand Down Expand Up @@ -231,7 +235,9 @@ public void testOverwrite() throws Exception {
env.execute();

// read
List<Row> results = executeAndCollect(new FlinkSourceBuilder(table).env(env).build());
List<Row> results =
executeAndCollect(
new FlinkSourceBuilder(table).sourceBounded(true).env(env).build());

Row[] expected = new Row[] {Row.of(9, "p2", 5), Row.of(5, "p1", 1), Row.of(0, "p1", 2)};
assertThat(results).containsExactlyInAnyOrder(expected);
Expand All @@ -246,7 +252,9 @@ public void testOverwrite() throws Exception {
env.execute();

// read
results = executeAndCollect(new FlinkSourceBuilder(table).env(env).build());
results =
executeAndCollect(
new FlinkSourceBuilder(table).sourceBounded(true).env(env).build());
expected = new Row[] {Row.of(19, "p2", 6), Row.of(5, "p1", 1), Row.of(0, "p1", 2)};
assertThat(results).containsExactlyInAnyOrder(expected);

Expand All @@ -266,7 +274,9 @@ public void testOverwrite() throws Exception {
env.execute();

// read
results = executeAndCollect(new FlinkSourceBuilder(table).env(env).build());
results =
executeAndCollect(
new FlinkSourceBuilder(table).sourceBounded(true).env(env).build());
expected = new Row[] {Row.of(20, "p2", 3)};
assertThat(results).containsExactlyInAnyOrder(expected);
}
Expand All @@ -280,7 +290,9 @@ public void testPartitionedNonKey() throws Exception {
env.execute();

// read
List<Row> results = executeAndCollect(new FlinkSourceBuilder(table).env(env).build());
List<Row> results =
executeAndCollect(
new FlinkSourceBuilder(table).sourceBounded(true).env(env).build());

// assert
// in streaming mode, expect origin data X 2 (FiniteTestSource)
Expand Down Expand Up @@ -318,6 +330,7 @@ private void testProjection(FileStoreTable table) throws Exception {
List<Row> results =
executeAndCollect(
new FlinkSourceBuilder(table)
.sourceBounded(true)
.projection(projection.toNestedIndexes())
.env(env)
.build(),
Expand Down

0 comments on commit 31a8c19

Please sign in to comment.