use of org.apache.druid.server.coordinator.TestDruidCoordinatorConfig in project druid by druid-io.
the class KillSupervisorsTest method testConstructorFailIfInvalidRetainDuration.
@Test
public void testConstructorFailIfInvalidRetainDuration() {
TestDruidCoordinatorConfig druidCoordinatorConfig = new TestDruidCoordinatorConfig(null, null, null, new Duration("PT5S"), null, null, null, new Duration("PT6S"), new Duration("PT-1S"), null, null, null, null, null, null, null, 10, null);
exception.expect(IllegalArgumentException.class);
exception.expectMessage("Coordinator supervisor kill retainDuration must be >= 0");
killSupervisors = new KillSupervisors(druidCoordinatorConfig, mockMetadataSupervisorManager);
}
use of org.apache.druid.server.coordinator.TestDruidCoordinatorConfig in project druid by druid-io.
the class KillSupervisorsTest method testConstructorFailIfInvalidPeriod.
@Test
public void testConstructorFailIfInvalidPeriod() {
TestDruidCoordinatorConfig druidCoordinatorConfig = new TestDruidCoordinatorConfig(null, null, null, new Duration("PT5S"), null, null, null, new Duration("PT3S"), new Duration("PT1S"), null, null, null, null, null, null, null, 10, null);
exception.expect(IllegalArgumentException.class);
exception.expectMessage("Coordinator supervisor kill period must be >= druid.coordinator.period.metadataStoreManagementPeriod");
killSupervisors = new KillSupervisors(druidCoordinatorConfig, mockMetadataSupervisorManager);
}
use of org.apache.druid.server.coordinator.TestDruidCoordinatorConfig in project druid by druid-io.
the class KillDatasourceMetadataTest method testConstructorFailIfInvalidRetainDuration.
@Test
public void testConstructorFailIfInvalidRetainDuration() {
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("PT-1S"), 10, null);
exception.expect(IllegalArgumentException.class);
exception.expectMessage("Coordinator datasource metadata kill retainDuration must be >= 0");
killDatasourceMetadata = new KillDatasourceMetadata(druidCoordinatorConfig, mockIndexerMetadataStorageCoordinator, mockMetadataSupervisorManager);
}
use of org.apache.druid.server.coordinator.TestDruidCoordinatorConfig in project druid by druid-io.
the class KillDatasourceMetadataTest method testConstructorFailIfInvalidPeriod.
@Test
public void testConstructorFailIfInvalidPeriod() {
TestDruidCoordinatorConfig druidCoordinatorConfig = new TestDruidCoordinatorConfig(null, null, null, new Duration("PT5S"), null, null, null, null, null, null, null, null, null, null, new Duration("PT3S"), new Duration("PT1S"), 10, null);
exception.expect(IllegalArgumentException.class);
exception.expectMessage("Coordinator datasource metadata kill period must be >= druid.coordinator.period.metadataStoreManagementPeriod");
killDatasourceMetadata = new KillDatasourceMetadata(druidCoordinatorConfig, mockIndexerMetadataStorageCoordinator, mockMetadataSupervisorManager);
}
use of org.apache.druid.server.coordinator.TestDruidCoordinatorConfig in project druid by druid-io.
the class KillDatasourceMetadataTest method testRunNotSkipIfLastRunMoreThanPeriod.
@Test
public void testRunNotSkipIfLastRunMoreThanPeriod() {
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.anySet());
Mockito.verify(mockServiceEmitter).emit(ArgumentMatchers.any(ServiceEventBuilder.class));
}
Aggregations