[TEST] increased logging
Original commit: elastic/x-pack-elasticsearch@4d5f35b9a6
This commit is contained in:
parent
52a7f956f4
commit
93ee4104fb
|
@ -298,6 +298,7 @@ public class CloseJobAction extends Action<CloseJobAction.Request, CloseJobActio
|
||||||
if (e != null) {
|
if (e != null) {
|
||||||
listener.onFailure(e);
|
listener.onFailure(e);
|
||||||
} else {
|
} else {
|
||||||
|
logger.debug("finalizing job [{}]", request.getJobId());
|
||||||
FinalizeJobExecutionAction.Request finalizeRequest =
|
FinalizeJobExecutionAction.Request finalizeRequest =
|
||||||
new FinalizeJobExecutionAction.Request(request.getJobId());
|
new FinalizeJobExecutionAction.Request(request.getJobId());
|
||||||
client.execute(FinalizeJobExecutionAction.INSTANCE, finalizeRequest,
|
client.execute(FinalizeJobExecutionAction.INSTANCE, finalizeRequest,
|
||||||
|
|
|
@ -142,6 +142,7 @@ public class FinalizeJobExecutionAction extends Action<FinalizeJobExecutionActio
|
||||||
ActionListener<Response> listener) throws Exception {
|
ActionListener<Response> listener) throws Exception {
|
||||||
String jobId = request.getJobId();
|
String jobId = request.getJobId();
|
||||||
String source = "finalize_job_execution [" + jobId + "]";
|
String source = "finalize_job_execution [" + jobId + "]";
|
||||||
|
logger.debug("finalizing job [{}]", request.getJobId());
|
||||||
clusterService.submitStateUpdateTask(source, new ClusterStateUpdateTask() {
|
clusterService.submitStateUpdateTask(source, new ClusterStateUpdateTask() {
|
||||||
@Override
|
@Override
|
||||||
public ClusterState execute(ClusterState currentState) throws Exception {
|
public ClusterState execute(ClusterState currentState) throws Exception {
|
||||||
|
@ -165,6 +166,7 @@ public class FinalizeJobExecutionAction extends Action<FinalizeJobExecutionActio
|
||||||
@Override
|
@Override
|
||||||
public void clusterStateProcessed(String source, ClusterState oldState,
|
public void clusterStateProcessed(String source, ClusterState oldState,
|
||||||
ClusterState newState) {
|
ClusterState newState) {
|
||||||
|
logger.debug("finalized job [{}]", request.getJobId());
|
||||||
listener.onResponse(new Response(true));
|
listener.onResponse(new Response(true));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -42,6 +42,7 @@ import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import static org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcessManager.MAX_RUNNING_JOBS_PER_NODE;
|
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 class BasicDistributedJobsIT extends BaseMlIntegTestCase {
|
||||||
|
|
||||||
public void testFailOverBasics() throws Exception {
|
public void testFailOverBasics() throws Exception {
|
||||||
|
|
|
@ -248,6 +248,7 @@ public abstract class BaseMlIntegTestCase extends ESIntegTestCase {
|
||||||
for (DatafeedConfig datafeed : mlMetadata.getDatafeeds().values()) {
|
for (DatafeedConfig datafeed : mlMetadata.getDatafeeds().values()) {
|
||||||
String datafeedId = datafeed.getId();
|
String datafeedId = datafeed.getId();
|
||||||
try {
|
try {
|
||||||
|
logger.info("Closing datafeed [{}]", datafeedId);
|
||||||
StopDatafeedAction.Response stopResponse =
|
StopDatafeedAction.Response stopResponse =
|
||||||
client.execute(StopDatafeedAction.INSTANCE, new StopDatafeedAction.Request(datafeedId)).get();
|
client.execute(StopDatafeedAction.INSTANCE, new StopDatafeedAction.Request(datafeedId)).get();
|
||||||
assertTrue(stopResponse.isStopped());
|
assertTrue(stopResponse.isStopped());
|
||||||
|
@ -289,6 +290,7 @@ public abstract class BaseMlIntegTestCase extends ESIntegTestCase {
|
||||||
try {
|
try {
|
||||||
CloseJobAction.Request closeRequest = new CloseJobAction.Request(jobId);
|
CloseJobAction.Request closeRequest = new CloseJobAction.Request(jobId);
|
||||||
closeRequest.setTimeout(TimeValue.timeValueSeconds(30L));
|
closeRequest.setTimeout(TimeValue.timeValueSeconds(30L));
|
||||||
|
logger.info("Closing job [{}]", jobId);
|
||||||
CloseJobAction.Response response =
|
CloseJobAction.Response response =
|
||||||
client.execute(CloseJobAction.INSTANCE, closeRequest).get();
|
client.execute(CloseJobAction.INSTANCE, closeRequest).get();
|
||||||
assertTrue(response.isClosed());
|
assertTrue(response.isClosed());
|
||||||
|
|
Loading…
Reference in New Issue