Skip to content

Commit 104b05e

Browse files
author
zhangyongxiang.alpha
committed
CI
1 parent 6fe31f5 commit 104b05e

File tree

2 files changed

+1
-33
lines changed

2 files changed

+1
-33
lines changed

amoro-ams/src/test/java/org/apache/amoro/server/scheduler/inline/TestConfigurableIntervalExecutors.java

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -64,36 +64,4 @@ public void testDanglingDeleteFilesShouldExecuteAfterInterval() {
6464
// 5 hours ago - should not execute
6565
Assert.assertFalse(executor.shouldExecute(now - Duration.ofHours(5).toMillis()));
6666
}
67-
68-
@Test
69-
public void testSnapshotsExpiringDefaultInterval() {
70-
Duration interval = Duration.ofHours(1);
71-
SnapshotsExpiringExecutor executor = new SnapshotsExpiringExecutor(null, 1, interval);
72-
73-
TableRuntime tableRuntime = Mockito.mock(TableRuntime.class);
74-
Assert.assertEquals(
75-
Duration.ofHours(1).toMillis(), executor.getNextExecutingTime(tableRuntime));
76-
}
77-
78-
@Test
79-
public void testSnapshotsExpiringCustomInterval() {
80-
Duration interval = Duration.ofMinutes(30);
81-
SnapshotsExpiringExecutor executor = new SnapshotsExpiringExecutor(null, 1, interval);
82-
83-
TableRuntime tableRuntime = Mockito.mock(TableRuntime.class);
84-
Assert.assertEquals(
85-
Duration.ofMinutes(30).toMillis(), executor.getNextExecutingTime(tableRuntime));
86-
}
87-
88-
@Test
89-
public void testSnapshotsExpiringShouldExecuteAfterInterval() {
90-
Duration interval = Duration.ofHours(2);
91-
SnapshotsExpiringExecutor executor = new SnapshotsExpiringExecutor(null, 1, interval);
92-
93-
long now = System.currentTimeMillis();
94-
// 3 hours ago - should execute
95-
Assert.assertTrue(executor.shouldExecute(now - Duration.ofHours(3).toMillis()));
96-
// 1 hour ago - should not execute
97-
Assert.assertFalse(executor.shouldExecute(now - Duration.ofHours(1).toMillis()));
98-
}
9967
}

amoro-common/src/main/java/org/apache/amoro/process/LocalExecutionEngine.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public void open(Map<String, String> properties) {
126126
properties.keySet().stream()
127127
.filter(key -> key.startsWith(POOL_CONFIG_PREFIX))
128128
.map(key -> key.substring(POOL_CONFIG_PREFIX.length()))
129-
.map(key -> key.substring(0, key.indexOf(".") + 1))
129+
.map(key -> key.substring(0, key.indexOf(".")))
130130
.map(String::toLowerCase)
131131
.filter(name -> !DEFAULT_POOL.equalsIgnoreCase(name))
132132
.collect(Collectors.toSet());

0 commit comments

Comments
 (0)