[TEST] increased logging

Original commit: elastic/x-pack-elasticsearch@4d5f35b9a6
This commit is contained in:
Martijn van Groningen 2017-03-30 20:09:16 +02:00
parent 52a7f956f4
commit 93ee4104fb
4 changed files with 6 additions and 0 deletions

View File

@ -298,6 +298,7 @@ public class CloseJobAction extends Action<CloseJobAction.Request, CloseJobActio
if (e != null) {
listener.onFailure(e);
} else {
logger.debug("finalizing job [{}]", request.getJobId());
FinalizeJobExecutionAction.Request finalizeRequest =
new FinalizeJobExecutionAction.Request(request.getJobId());
client.execute(FinalizeJobExecutionAction.INSTANCE, finalizeRequest,

View File

@ -142,6 +142,7 @@ public class FinalizeJobExecutionAction extends Action<FinalizeJobExecutionActio
ActionListener<Response> listener) throws Exception {
String jobId = request.getJobId();
String source = "finalize_job_execution [" + jobId + "]";
logger.debug("finalizing job [{}]", request.getJobId());
clusterService.submitStateUpdateTask(source, new ClusterStateUpdateTask() {
@Override
public ClusterState execute(ClusterState currentState) throws Exception {
@ -165,6 +166,7 @@ public class FinalizeJobExecutionAction extends Action<FinalizeJobExecutionActio
@Override
public void clusterStateProcessed(String source, ClusterState oldState,
ClusterState newState) {
logger.debug("finalized job [{}]", request.getJobId());
listener.onResponse(new Response(true));
}
});

View File

@ -42,6 +42,7 @@ import java.util.concurrent.TimeUnit;
import static org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcessManager.MAX_RUNNING_JOBS_PER_NODE;
@TestLogging("org.elasticsearch.xpack.ml:DEBUG")
public class BasicDistributedJobsIT extends BaseMlIntegTestCase {
public void testFailOverBasics() throws Exception {

View File

@ -248,6 +248,7 @@ public abstract class BaseMlIntegTestCase extends ESIntegTestCase {
for (DatafeedConfig datafeed : mlMetadata.getDatafeeds().values()) {
String datafeedId = datafeed.getId();
try {
logger.info("Closing datafeed [{}]", datafeedId);
StopDatafeedAction.Response stopResponse =
client.execute(StopDatafeedAction.INSTANCE, new StopDatafeedAction.Request(datafeedId)).get();
assertTrue(stopResponse.isStopped());
@ -289,6 +290,7 @@ public abstract class BaseMlIntegTestCase extends ESIntegTestCase {
try {
CloseJobAction.Request closeRequest = new CloseJobAction.Request(jobId);
closeRequest.setTimeout(TimeValue.timeValueSeconds(30L));
logger.info("Closing job [{}]", jobId);
CloseJobAction.Response response =
client.execute(CloseJobAction.INSTANCE, closeRequest).get();
assertTrue(response.isClosed());