diff --git a/integration-tests/src/main/java/io/druid/testing/clients/CoordinatorResourceTestClient.java b/integration-tests/src/main/java/io/druid/testing/clients/CoordinatorResourceTestClient.java index 04f7bc03a29..5307e1cdf40 100644 --- a/integration-tests/src/main/java/io/druid/testing/clients/CoordinatorResourceTestClient.java +++ b/integration-tests/src/main/java/io/druid/testing/clients/CoordinatorResourceTestClient.java @@ -122,23 +122,30 @@ public class CoordinatorResourceTestClient public void unloadSegmentsForDataSource(String dataSource, Interval interval) { - killDataSource(dataSource, false, interval); + try { + makeRequest( + HttpMethod.DELETE, + String.format( + "%sdatasources/%s", + getCoordinatorURL(), + dataSource + ) + ); + } + catch (Exception e) { + throw Throwables.propagate(e); + } } public void deleteSegmentsDataSource(String dataSource, Interval interval) - { - killDataSource(dataSource, true, interval); - } - - private void killDataSource(String dataSource, boolean kill, Interval interval) { try { makeRequest( HttpMethod.DELETE, String.format( - "%sdatasources/%s/intervals/%s?kill=%s", + "%sdatasources/%s/intervals/%s?kill=true", getCoordinatorURL(), - dataSource, interval.toString().replace("/", "_"), kill + dataSource, interval.toString().replace("/", "_") ) ); } diff --git a/integration-tests/src/test/java/io/druid/tests/indexer/ITKafkaTest.java b/integration-tests/src/test/java/io/druid/tests/indexer/ITKafkaTest.java index 41cb112f693..5081f48621d 100644 --- a/integration-tests/src/test/java/io/druid/tests/indexer/ITKafkaTest.java +++ b/integration-tests/src/test/java/io/druid/tests/indexer/ITKafkaTest.java @@ -273,7 +273,7 @@ public class ITKafkaTest extends AbstractIndexerTest } @AfterClass - public void afterClass() + public void afterClass() throws Exception { LOG.info("teardown"); @@ -285,12 +285,7 @@ public class ITKafkaTest extends AbstractIndexerTest // remove segments if (segmentsExist) { - try { unloadAndKillData(DATASOURCE); - } - catch (Exception e) { - LOG.warn("exception while removing segments: [%s]", e.getMessage()); - } } } }