From 5d0388ccb3ba92cb67923dc42a3f92a764594e4d Mon Sep 17 00:00:00 2001 From: David Roberts Date: Tue, 10 Oct 2017 16:20:09 +0100 Subject: [PATCH] [TEST] Fix ML node attribute test When ML is disabled the attribute checking is stricter, but the test did not reflect this Original commit: elastic/x-pack-elasticsearch@613e97c59530e5a6dab91d3260db24f6feb72c92 --- .../org/elasticsearch/xpack/ml/MachineLearningTests.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugin/src/test/java/org/elasticsearch/xpack/ml/MachineLearningTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/MachineLearningTests.java index 4eb208fe102..96d3787d1e4 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/ml/MachineLearningTests.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/ml/MachineLearningTests.java @@ -30,12 +30,11 @@ public class MachineLearningTests extends ESTestCase { assertNotNull(machineLearning.additionalSettings()); } - public void testNoAttributes_givenSame() { + public void testNoAttributes_givenSameAndMlEnabled() { Settings.Builder builder = Settings.builder(); if (randomBoolean()) { - boolean enabled = randomBoolean(); - builder.put("xpack.ml.enabled", enabled); - builder.put("node.attr.ml.enabled", enabled); + builder.put("xpack.ml.enabled", true); + builder.put("node.attr.ml.enabled", true); } if (randomBoolean()) { int maxOpenJobs = randomIntBetween(5, 15);