integration-tests: stop using kill=false to disable segments

This commit is contained in:
Robin 2016-02-14 12:54:43 -06:00
parent 3ab432ab02
commit 34b143ae10
2 changed files with 16 additions and 14 deletions

View File

@ -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("/", "_")
)
);
}

View File

@ -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());
}
}
}
}