From 58caa589419ff82abc6a29be51139e9e40925add Mon Sep 17 00:00:00 2001 From: Dimitris Athanasiou Date: Fri, 8 Jun 2018 15:19:51 +0100 Subject: [PATCH 1/2] [ML][TEST] Mute tests using rules This is in preparation of pushing the new rules design in the `ml-cpp` side. These tests will be switched on again after merging in the new rules implementation. --- .../elasticsearch/xpack/ml/integration/DetectionRulesIT.java | 2 ++ .../elasticsearch/xpack/ml/integration/ScheduledEventsIT.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/x-pack/qa/ml-native-tests/src/test/java/org/elasticsearch/xpack/ml/integration/DetectionRulesIT.java b/x-pack/qa/ml-native-tests/src/test/java/org/elasticsearch/xpack/ml/integration/DetectionRulesIT.java index 28565c5923c38..5e43790e2ccaf 100644 --- a/x-pack/qa/ml-native-tests/src/test/java/org/elasticsearch/xpack/ml/integration/DetectionRulesIT.java +++ b/x-pack/qa/ml-native-tests/src/test/java/org/elasticsearch/xpack/ml/integration/DetectionRulesIT.java @@ -24,6 +24,7 @@ import org.elasticsearch.xpack.core.ml.job.config.RuleConditionType; import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; import org.junit.After; +import org.junit.Ignore; import java.io.IOException; import java.util.ArrayList; @@ -44,6 +45,7 @@ /** * An integration test for detection rules */ +@Ignore public class DetectionRulesIT extends MlNativeAutodetectIntegTestCase { @After diff --git a/x-pack/qa/ml-native-tests/src/test/java/org/elasticsearch/xpack/ml/integration/ScheduledEventsIT.java b/x-pack/qa/ml-native-tests/src/test/java/org/elasticsearch/xpack/ml/integration/ScheduledEventsIT.java index 6703e4ef2365b..fbb3fe20afcaf 100644 --- a/x-pack/qa/ml-native-tests/src/test/java/org/elasticsearch/xpack/ml/integration/ScheduledEventsIT.java +++ b/x-pack/qa/ml-native-tests/src/test/java/org/elasticsearch/xpack/ml/integration/ScheduledEventsIT.java @@ -20,6 +20,7 @@ import org.elasticsearch.xpack.core.ml.job.results.AnomalyRecord; import org.elasticsearch.xpack.core.ml.job.results.Bucket; import org.junit.After; +import org.junit.Ignore; import java.io.IOException; import java.time.Instant; @@ -34,6 +35,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; +@Ignore public class ScheduledEventsIT extends MlNativeAutodetectIntegTestCase { @After From 4de444727dbbcb653234552e4d4c393e0ec82574 Mon Sep 17 00:00:00 2001 From: Dimitris Athanasiou Date: Fri, 8 Jun 2018 16:55:28 +0100 Subject: [PATCH 2/2] Use @AwaitsFix instead of @Ignore --- .../elasticsearch/xpack/ml/integration/DetectionRulesIT.java | 3 ++- .../elasticsearch/xpack/ml/integration/ScheduledEventsIT.java | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/x-pack/qa/ml-native-tests/src/test/java/org/elasticsearch/xpack/ml/integration/DetectionRulesIT.java b/x-pack/qa/ml-native-tests/src/test/java/org/elasticsearch/xpack/ml/integration/DetectionRulesIT.java index 5e43790e2ccaf..47ced4a96dde8 100644 --- a/x-pack/qa/ml-native-tests/src/test/java/org/elasticsearch/xpack/ml/integration/DetectionRulesIT.java +++ b/x-pack/qa/ml-native-tests/src/test/java/org/elasticsearch/xpack/ml/integration/DetectionRulesIT.java @@ -45,7 +45,6 @@ /** * An integration test for detection rules */ -@Ignore public class DetectionRulesIT extends MlNativeAutodetectIntegTestCase { @After @@ -53,6 +52,7 @@ public void cleanUpTest() throws Exception { cleanUp(); } + @AwaitsFix(bugUrl = "this test is muted temporarily until the new rules implementation is merged in") public void testNumericalRule() throws Exception { RuleCondition condition1 = RuleCondition.createNumerical( RuleConditionType.NUMERICAL_ACTUAL, @@ -154,6 +154,7 @@ public void testNumericalRule() throws Exception { assertThat(secondHaldRecordByFieldValues, contains("by_field_value_1", "by_field_value_2")); } + @AwaitsFix(bugUrl = "this test is muted temporarily until the new rules implementation is merged in") public void testCategoricalRule() throws Exception { MlFilter safeIps = new MlFilter("safe_ips", Arrays.asList("111.111.111.111", "222.222.222.222")); assertThat(putMlFilter(safeIps), is(true)); diff --git a/x-pack/qa/ml-native-tests/src/test/java/org/elasticsearch/xpack/ml/integration/ScheduledEventsIT.java b/x-pack/qa/ml-native-tests/src/test/java/org/elasticsearch/xpack/ml/integration/ScheduledEventsIT.java index fbb3fe20afcaf..8410075ff5e27 100644 --- a/x-pack/qa/ml-native-tests/src/test/java/org/elasticsearch/xpack/ml/integration/ScheduledEventsIT.java +++ b/x-pack/qa/ml-native-tests/src/test/java/org/elasticsearch/xpack/ml/integration/ScheduledEventsIT.java @@ -35,7 +35,6 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; -@Ignore public class ScheduledEventsIT extends MlNativeAutodetectIntegTestCase { @After @@ -43,6 +42,7 @@ public void cleanUpTest() { cleanUp(); } + @AwaitsFix(bugUrl = "this test is muted temporarily until the new rules implementation is merged in") public void testScheduledEvents() throws IOException { TimeValue bucketSpan = TimeValue.timeValueMinutes(30); @@ -154,6 +154,7 @@ public void testScheduledEvents() throws IOException { assertThat(records, is(empty())); } + @AwaitsFix(bugUrl = "this test is muted temporarily until the new rules implementation is merged in") public void testScheduledEventWithInterimResults() throws IOException { TimeValue bucketSpan = TimeValue.timeValueMinutes(30); Job.Builder job = createJob("scheduled-events-interim-results", bucketSpan); @@ -195,6 +196,7 @@ public void testScheduledEventWithInterimResults() throws IOException { /** * Test an open job picks up changes to scheduled events/calendars */ + @AwaitsFix(bugUrl = "this test is muted temporarily until the new rules implementation is merged in") public void testOnlineUpdate() throws Exception { TimeValue bucketSpan = TimeValue.timeValueMinutes(30); Job.Builder job = createJob("scheduled-events-online-update", bucketSpan);