Skip to content

Commit b379642

Browse files
committed
nit
1 parent bd93e7f commit b379642

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

fluss-lake/fluss-lake-iceberg/src/test/java/org/apache/fluss/lake/iceberg/maintenance/IcebergRewriteITCase.java

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import org.junit.jupiter.api.BeforeAll;
2929
import org.junit.jupiter.api.Test;
3030

31-
import java.util.ArrayList;
31+
import java.util.Arrays;
3232
import java.util.List;
3333

3434
import static org.apache.fluss.testutils.DataTestUtils.row;
@@ -55,32 +55,26 @@ void testLogTableCompaction() throws Exception {
5555
long t1Id = createLogTable(t1, true);
5656
TableBucket t1Bucket = new TableBucket(t1Id, 0);
5757

58-
writeTableRecords(t1, t1Bucket, 1, 3, 3);
58+
int i = 0;
59+
writeLogTableRecords(t1, t1Bucket, ++i);
5960

60-
writeTableRecords(t1, t1Bucket, 4, 6, 6);
61+
writeLogTableRecords(t1, t1Bucket, ++i);
6162

62-
writeTableRecords(t1, t1Bucket, 7, 9, 9);
63+
writeLogTableRecords(t1, t1Bucket, ++i);
6364
checkFileCountInIcebergTable(t1, 3);
6465

6566
// trigger compaction
66-
writeTableRecords(t1, t1Bucket, 10, 12, 12);
67+
writeLogTableRecords(t1, t1Bucket, ++i);
6768
checkFileCountInIcebergTable(t1, 2);
6869
} finally {
6970
jobClient.cancel().get();
7071
}
7172
}
7273

73-
private void writeTableRecords(
74-
TablePath tablePath,
75-
TableBucket tableBucket,
76-
int from,
77-
int to,
78-
long expectedLogEndOffset)
74+
private void writeLogTableRecords(
75+
TablePath tablePath, TableBucket tableBucket, long expectedLogEndOffset)
7976
throws Exception {
80-
List<InternalRow> rows = new ArrayList<>();
81-
for (int i = from; i <= to; i++) {
82-
rows.add(row(i, "v" + i));
83-
}
77+
List<InternalRow> rows = Arrays.asList(row(1, "v1"));
8478
writeRows(tablePath, rows, true);
8579
assertReplicaStatus(tableBucket, expectedLogEndOffset);
8680
}

0 commit comments

Comments
 (0)