Merge pull request #2470 from rasahner/IT_killFalse

integration-tests: stop using kill=false to disable segments
This commit is contained in:
Fangjin Yang 2016-02-16 09:43:35 -08:00
commit 5364aa5b6c
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());
}
}
}
}