use of io.druid.server.coordinator.TestDruidCoordinatorConfig in project druid by druid-io.
the class DruidCoordinatorSegmentKillerTest method testFindIntervalForKillTask.
private void testFindIntervalForKillTask(List<Interval> segmentManagerResult, Interval expected) {
MetadataSegmentManager segmentManager = EasyMock.createMock(MetadataSegmentManager.class);
EasyMock.expect(segmentManager.getUnusedSegmentIntervals(EasyMock.anyString(), EasyMock.anyObject(Interval.class), EasyMock.anyInt())).andReturn(segmentManagerResult);
EasyMock.replay(segmentManager);
IndexingServiceClient indexingServiceClient = EasyMock.createMock(IndexingServiceClient.class);
DruidCoordinatorSegmentKiller coordinatorSegmentKiller = new DruidCoordinatorSegmentKiller(segmentManager, indexingServiceClient, new TestDruidCoordinatorConfig(null, null, Duration.parse("PT76400S"), new Duration(1), Duration.parse("PT86400S"), Duration.parse("PT86400S"), 1000, null, false, false, Duration.ZERO));
Assert.assertEquals(expected, coordinatorSegmentKiller.findIntervalForKillTask("test", 10000));
}
Aggregations