diff --git a/amoro-ams/src/test/java/org/apache/amoro/server/optimizing/maintainer/TestDataExpire.java b/amoro-ams/src/test/java/org/apache/amoro/server/optimizing/maintainer/TestDataExpire.java index d9ea24cb7f..6cdf27bc32 100644 --- a/amoro-ams/src/test/java/org/apache/amoro/server/optimizing/maintainer/TestDataExpire.java +++ b/amoro-ams/src/test/java/org/apache/amoro/server/optimizing/maintainer/TestDataExpire.java @@ -245,7 +245,6 @@ private void testKeyedPartitionLevel() { CloseableIterable scan = buildKeyedFileScanHelper().scan(); assertScanResult(scan, 4, 0); - // expire partitions that order than 2022-01-02 18:00:00.000 DataExpirationConfig config = parseDataExpirationConfig(keyedTable); getMaintainerAndExpire(config, "2022-01-03T18:00:00.000"); diff --git a/amoro-ams/src/test/java/org/apache/amoro/server/optimizing/maintainer/TestDataExpireHive.java b/amoro-ams/src/test/java/org/apache/amoro/server/optimizing/maintainer/TestDataExpireHive.java index 625b50bce3..dd9824bb60 100644 --- a/amoro-ams/src/test/java/org/apache/amoro/server/optimizing/maintainer/TestDataExpireHive.java +++ b/amoro-ams/src/test/java/org/apache/amoro/server/optimizing/maintainer/TestDataExpireHive.java @@ -25,14 +25,15 @@ import org.apache.amoro.hive.catalog.HiveCatalogTestHelper; import org.apache.amoro.hive.catalog.HiveTableTestHelper; import org.apache.amoro.io.MixedDataTestHelpers; +import org.apache.amoro.shade.guava32.com.google.common.collect.ImmutableMap; +import org.apache.amoro.table.TableProperties; import org.apache.iceberg.data.Record; import org.junit.ClassRule; -import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import java.math.BigDecimal; +import java.util.Map; -@RunWith(Parameterized.class) public class TestDataExpireHive extends TestDataExpire { @ClassRule public static TestHMS TEST_HMS = new TestHMS(); @@ -75,4 +76,11 @@ protected Record createRecord(int id, String name, long ts, String opTime) { new BigDecimal("0"), opTime.substring(0, 10)); } + + protected static Map getDefaultProp() { + return ImmutableMap.of( + TableProperties.ENABLE_DATA_EXPIRATION, "true", + TableProperties.DATA_EXPIRATION_FIELD, "op_time_day", + TableProperties.DATA_EXPIRATION_RETENTION_TIME, "1d"); + } }