use of org.apache.druid.server.coordinator.TestDruidCoordinatorConfig in project druid by druid-io.
the class KillAuditLogTest method testConstructorFailIfInvalidRetainDuration.
@Test
public void testConstructorFailIfInvalidRetainDuration() {
TestDruidCoordinatorConfig druidCoordinatorConfig = new TestDruidCoordinatorConfig(null, null, null, new Duration("PT5S"), null, null, null, null, null, new Duration("PT6S"), new Duration("PT-1S"), null, null, null, null, null, 10, null);
exception.expect(IllegalArgumentException.class);
exception.expectMessage("coordinator audit kill retainDuration must be >= 0");
killAuditLog = new KillAuditLog(mockAuditManager, druidCoordinatorConfig);
}
use of org.apache.druid.server.coordinator.TestDruidCoordinatorConfig in project druid by druid-io.
the class KillDatasourceMetadataTest method testRunWithEmptyFilterExcludedDatasource.
@Test
public void testRunWithEmptyFilterExcludedDatasource() {
Mockito.when(mockDruidCoordinatorRuntimeParams.getEmitter()).thenReturn(mockServiceEmitter);
TestDruidCoordinatorConfig druidCoordinatorConfig = new TestDruidCoordinatorConfig(null, null, null, new Duration("PT5S"), null, null, null, null, null, null, null, null, null, null, new Duration("PT6S"), new Duration("PT1S"), 10, null);
killDatasourceMetadata = new KillDatasourceMetadata(druidCoordinatorConfig, mockIndexerMetadataStorageCoordinator, mockMetadataSupervisorManager);
killDatasourceMetadata.run(mockDruidCoordinatorRuntimeParams);
Mockito.verify(mockIndexerMetadataStorageCoordinator).removeDataSourceMetadataOlderThan(ArgumentMatchers.anyLong(), ArgumentMatchers.eq(ImmutableSet.of()));
Mockito.verify(mockServiceEmitter).emit(ArgumentMatchers.any(ServiceEventBuilder.class));
}
Aggregations