mirror of https://github.com/apache/druid.git
integration-tests: stop using kill=false to disable segments
This commit is contained in:
parent
3ab432ab02
commit
34b143ae10
|
@ -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("/", "_")
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -273,7 +273,7 @@ public class ITKafkaTest extends AbstractIndexerTest
|
|||
}
|
||||
|
||||
@AfterClass
|
||||
public void afterClass()
|
||||
public void afterClass() throws Exception
|
||||
{
|
||||
LOG.info("teardown");
|
||||
|
||||
|
@ -285,13 +285,8 @@ public class ITKafkaTest extends AbstractIndexerTest
|
|||
|
||||
// remove segments
|
||||
if (segmentsExist) {
|
||||
try {
|
||||
unloadAndKillData(DATASOURCE);
|
||||
}
|
||||
catch (Exception e) {
|
||||
LOG.warn("exception while removing segments: [%s]", e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue