Skip to content

Commit 97939ea

Browse files
committed
fix
1 parent 8d7c13b commit 97939ea

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

paimon-core/src/test/java/org/apache/paimon/table/PrimaryKeySimpleTableTest.java

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
import org.apache.paimon.types.DataTypes;
7272
import org.apache.paimon.types.RowKind;
7373
import org.apache.paimon.types.RowType;
74+
import org.apache.paimon.utils.ChangelogManager;
7475
import org.apache.paimon.utils.Pair;
7576

7677
import org.apache.parquet.hadoop.ParquetOutputFormat;
@@ -99,6 +100,7 @@
99100
import java.util.function.Function;
100101
import java.util.stream.Collectors;
101102

103+
import static java.util.Collections.singletonList;
102104
import static java.util.Collections.singletonMap;
103105
import static org.apache.paimon.CoreOptions.BUCKET;
104106
import static org.apache.paimon.CoreOptions.CHANGELOG_FILE_FORMAT;
@@ -2245,15 +2247,10 @@ public void testRollbackToTagWithChangelogDecoupled(String changelogProducer) th
22452247

22462248
table.rollbackTo("test1");
22472249

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();
22572254
}
22582255

22592256
@ParameterizedTest

paimon-core/src/test/java/org/apache/paimon/table/SimpleTableTestBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1740,7 +1740,7 @@ protected void generateBranch(FileStoreTable table) throws Exception {
17401740
.containsExactlyInAnyOrder("0|0|0|binary|varbinary|mapKey:mapVal|multiset");
17411741
}
17421742

1743-
private void assertRollbackTo(
1743+
protected void assertRollbackTo(
17441744
FileStoreTable table,
17451745
List<Long> expectedSnapshots,
17461746
long expectedEarliest,

0 commit comments

Comments
 (0)