Skip to content

Commit 4dd7b46

Browse files
committed
fix
1 parent 49f55e6 commit 4dd7b46

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

paimon-core/src/test/java/org/apache/paimon/rest/RESTCatalogTest.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1617,18 +1617,24 @@ public void testListPartitionsPagedWithMultiLevel() throws Exception {
16171617

16181618
@Test
16191619
void testPartitionExpire() throws Exception {
1620+
// create table
16201621
Identifier identifier = Identifier.create("test_db", "test_partition_expire");
16211622
Map<String, String> options = new HashMap<>();
16221623
options.put(PARTITION_EXPIRATION_STRATEGY.key(), "update-time");
16231624
options.put(PARTITION_EXPIRATION_TIME.key(), "1 ms");
16241625
options.put(END_INPUT_CHECK_PARTITION_EXPIRE.key(), "TRUE");
1625-
options.put(COMMIT_USER_PREFIX.key(), "my_user");
1626+
options.put(METASTORE_PARTITIONED_TABLE.key(), "TRUE");
16261627
createTable(identifier, options, Lists.newArrayList("col1"));
1627-
Table table = catalog.getTable(identifier);
1628+
1629+
// write and expire table
1630+
Table table =
1631+
catalog.getTable(identifier)
1632+
.copy(singletonMap(COMMIT_USER_PREFIX.key(), "my_user"));
16281633
batchWrite(table, Arrays.asList(1, 2, 3));
16291634
Thread.sleep(1000);
16301635
batchWrite(table, Arrays.asList(4, 5, 6));
16311636
Snapshot snapshot = table.latestSnapshot().get();
1637+
assertThat(snapshot.commitKind()).isEqualTo(Snapshot.CommitKind.OVERWRITE);
16321638
assertThat(snapshot.commitUser()).startsWith("my_user");
16331639
}
16341640

0 commit comments

Comments
 (0)