Copilot commented on code in PR #2228:
URL: https://github.com/apache/fluss/pull/2228#discussion_r2642692601


##########
fluss-flink/fluss-flink-common/src/test/java/org/apache/fluss/flink/tiering/committer/FlussTableLakeSnapshotCommitterTest.java:
##########
@@ -61,44 +68,94 @@ void afterEach() throws Exception {
     void testCommit(boolean isPartitioned) throws Exception {
         TablePath tablePath =
                 TablePath.of("fluss", "test_commit" + (isPartitioned ? 
"_partitioned" : ""));
-        long tableId =
-                createTable(
-                        tablePath,
-                        isPartitioned
-                                ? DATA1_PARTITIONED_TABLE_DESCRIPTOR
-                                : DATA1_TABLE_DESCRIPTOR);
+        Tuple2<Long, Collection<Long>> tableIdAndPartitions = 
createTable(tablePath, isPartitioned);
+        long tableId = tableIdAndPartitions.f0;
+        Collection<Long> partitions = tableIdAndPartitions.f1;
 
-        List<String> partitions;
-        Map<String, Long> partitionNameAndIds = new HashMap<>();
-        if (!isPartitioned) {
-            FLUSS_CLUSTER_EXTENSION.waitUntilTableReady(tableId);
-            partitions = Collections.singletonList(null);
-        } else {
-            partitionNameAndIds = 
FLUSS_CLUSTER_EXTENSION.waitUntilPartitionAllReady(tablePath);
-            partitions = new ArrayList<>(partitionNameAndIds.keySet());
+        Map<TableBucket, Long> logEndOffsets = mockLogEndOffsets(tableId, 
partitions);
+
+        long snapshotId = 3;
+        // commit offsets
+        flussTableLakeSnapshotCommitter.commit(tableId, snapshotId, 
logEndOffsets);
+        LakeSnapshot lakeSnapshot = 
admin.getLatestLakeSnapshot(tablePath).get();
+        assertThat(lakeSnapshot.getSnapshotId()).isEqualTo(3);
+
+        // get and check the offsets
+        Map<TableBucket, Long> bucketLogOffsets = 
lakeSnapshot.getTableBucketsOffset();
+        assertThat(bucketLogOffsets).isEqualTo(logEndOffsets);
+    }
+
+    @ParameterizedTest
+    @ValueSource(booleans = {true, false})
+    void testCompatibilityWithoutSerializationVersion(boolean isPartitioned) 
throws Exception {
+        TablePath tablePath =
+                TablePath.of(
+                        "fluss",
+                        "test_lagacy_version_commit" + (isPartitioned ? 
"_partitioned" : ""));

Review Comment:
   Spelling error: "lagacy" should be "legacy".
   ```suggestion
                           "test_legacy_version_commit" + (isPartitioned ? 
"_partitioned" : ""));
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to