[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@613e97c595
This commit is contained in:
David Roberts 2017-10-10 16:20:09 +01:00
parent ab9cc25a8e
commit 5d0388ccb3
1 changed files with 3 additions and 4 deletions

View File

@ -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);