|
71 | 71 | import org.apache.paimon.types.DataTypes; |
72 | 72 | import org.apache.paimon.types.RowKind; |
73 | 73 | import org.apache.paimon.types.RowType; |
| 74 | +import org.apache.paimon.utils.ChangelogManager; |
74 | 75 | import org.apache.paimon.utils.Pair; |
75 | 76 |
|
76 | 77 | import org.apache.parquet.hadoop.ParquetOutputFormat; |
|
99 | 100 | import java.util.function.Function; |
100 | 101 | import java.util.stream.Collectors; |
101 | 102 |
|
| 103 | +import static java.util.Collections.singletonList; |
102 | 104 | import static java.util.Collections.singletonMap; |
103 | 105 | import static org.apache.paimon.CoreOptions.BUCKET; |
104 | 106 | import static org.apache.paimon.CoreOptions.CHANGELOG_FILE_FORMAT; |
@@ -2245,15 +2247,10 @@ public void testRollbackToTagWithChangelogDecoupled(String changelogProducer) th |
2245 | 2247 |
|
2246 | 2248 | table.rollbackTo("test1"); |
2247 | 2249 |
|
2248 | | - List<java.nio.file.Path> files = |
2249 | | - Files.walk(new File(tablePath.toUri().getPath()).toPath()) |
2250 | | - .collect(Collectors.toList()); |
2251 | | - assertThat(files.size()).isEqualTo(19); |
2252 | | - // rollback snapshot case testRollbackToSnapshotCase0 plus 4: |
2253 | | - // table-path/tag/tag-test1 |
2254 | | - // table-path/changelog |
2255 | | - // table-path/changelog/LATEST |
2256 | | - // table-path/changelog/EARLIEST |
| 2250 | + assertRollbackTo(table, singletonList(1L), 1, 1, singletonList("test1")); |
| 2251 | + ChangelogManager changelogManager = table.changelogManager(); |
| 2252 | + assertThat(changelogManager.earliestLongLivedChangelogId()).isNull(); |
| 2253 | + assertThat(changelogManager.latestLongLivedChangelogId()).isNull(); |
2257 | 2254 | } |
2258 | 2255 |
|
2259 | 2256 | @ParameterizedTest |
|
0 commit comments