[test] if enabled always specify setting other randomly specify setting to false.
Original commit: elastic/x-pack-elasticsearch@eacdb979e2947fe532f9af73cdec18264ed00b45
@@ -42,12 +42,12 @@ public class MachineLearningFeatureSetTests extends ESTestCase {
boolean enabled = randomBoolean();
Settings.Builder settings = Settings.builder();
if (enabled) {
- if (randomBoolean()) {
settings.put("xpack.ml.enabled", enabled);
- }
} else {
+ if (randomBoolean()) {
settings.put("xpack.ml.enabled", enabled);
}
+ }
MachineLearningFeatureSet featureSet = new MachineLearningFeatureSet(settings.build(), licenseState);
assertThat(featureSet.enabled(), is(enabled));
assertThat(featureSet.usage().enabled(), is(enabled));
