From a0099cace6466839ddbea2a5692fcc3c6087885b Mon Sep 17 00:00:00 2001 From: Dimitrios Athanasiou Date: Wed, 19 Apr 2017 19:51:17 +0100 Subject: [PATCH] [TEST] Call get on update job action from DetectionRulesIT This was the reason for the intermittent failures of this test. Original commit: elastic/x-pack-elasticsearch@e8605590a107193885d9f8479635860df82496e7 --- .../elasticsearch/xpack/ml/integration/DetectionRulesIT.java | 2 +- .../xpack/ml/integration/MlNativeAutodetectIntegTestCase.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/DetectionRulesIT.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/DetectionRulesIT.java index d2468f65667..25cb9209393 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/DetectionRulesIT.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/DetectionRulesIT.java @@ -73,7 +73,7 @@ public class DetectionRulesIT extends MlNativeAutodetectIntegTestCase { Arrays.asList(detector.build())); analysisConfig.setBucketSpan(TimeValue.timeValueHours(1)); DataDescription.Builder dataDescription = new DataDescription.Builder(); - Job.Builder job = new Job.Builder("detectrion-rule-numeric-test"); + Job.Builder job = new Job.Builder("detection-rule-numeric-test"); job.setAnalysisConfig(analysisConfig); job.setDataDescription(dataDescription); diff --git a/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/MlNativeAutodetectIntegTestCase.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/MlNativeAutodetectIntegTestCase.java index ae14ffdab19..527459fd5d4 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/MlNativeAutodetectIntegTestCase.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/MlNativeAutodetectIntegTestCase.java @@ -128,7 +128,7 @@ abstract class MlNativeAutodetectIntegTestCase extends SecurityIntegTestCase { protected void updateJob(String jobId, JobUpdate update) throws Exception { UpdateJobAction.Request request = new UpdateJobAction.Request(jobId, update); - client().execute(UpdateJobAction.INSTANCE, request); + client().execute(UpdateJobAction.INSTANCE, request).get(); } protected void deleteJob(String jobId) throws Exception {