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)
|
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)
|
public void deleteSegmentsDataSource(String dataSource, Interval interval)
|
||||||
{
|
|
||||||
killDataSource(dataSource, true, interval);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void killDataSource(String dataSource, boolean kill, Interval interval)
|
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
makeRequest(
|
makeRequest(
|
||||||
HttpMethod.DELETE,
|
HttpMethod.DELETE,
|
||||||
String.format(
|
String.format(
|
||||||
"%sdatasources/%s/intervals/%s?kill=%s",
|
"%sdatasources/%s/intervals/%s?kill=true",
|
||||||
getCoordinatorURL(),
|
getCoordinatorURL(),
|
||||||
dataSource, interval.toString().replace("/", "_"), kill
|
dataSource, interval.toString().replace("/", "_")
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -273,7 +273,7 @@ public class ITKafkaTest extends AbstractIndexerTest
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public void afterClass()
|
public void afterClass() throws Exception
|
||||||
{
|
{
|
||||||
LOG.info("teardown");
|
LOG.info("teardown");
|
||||||
|
|
||||||
|
@ -285,12 +285,7 @@ public class ITKafkaTest extends AbstractIndexerTest
|
||||||
|
|
||||||
// remove segments
|
// remove segments
|
||||||
if (segmentsExist) {
|
if (segmentsExist) {
|
||||||
try {
|
|
||||||
unloadAndKillData(DATASOURCE);
|
unloadAndKillData(DATASOURCE);
|
||||||
}
|
|
||||||
catch (Exception e) {
|
|
||||||
LOG.warn("exception while removing segments: [%s]", e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue