use of io.prestosql.vacuum.AutoVacuumConfig in project hetu-core by openlookeng.
the class TestAutoVacuumConfig method testExplicitPropertyMappings.
@Test
public void testExplicitPropertyMappings() {
Map<String, String> properties = new ImmutableMap.Builder<String, String>().put("auto-vacuum.enabled", "true").put("auto-vacuum.scan.interval", "15m").put("auto-vacuum.scan.threads", "0").build();
AutoVacuumConfig expected = new AutoVacuumConfig();
try {
newInstance(expected.getClass(), properties);
} catch (Exception e) {
assertTrue(e.getMessage().contains("auto-vacuum.scan.threads: must be greater than or equal to 1"));
}
properties = new ImmutableMap.Builder<String, String>().put("auto-vacuum.enabled", "true").put("auto-vacuum.scan.interval", "14s").put("auto-vacuum.scan.threads", "1").build();
try {
newInstance(expected.getClass(), properties);
} catch (Exception e) {
assertTrue(e.getMessage().contains("Invalid configuration property auto-vacuum.scan.interval"));
}
}
Aggregations