diff --git a/src/test/java/org/elasticsearch/watcher/execution/ManualExecutionTests.java b/src/test/java/org/elasticsearch/watcher/execution/ManualExecutionTests.java index 5194c740e32..00354b7f998 100644 --- a/src/test/java/org/elasticsearch/watcher/execution/ManualExecutionTests.java +++ b/src/test/java/org/elasticsearch/watcher/execution/ManualExecutionTests.java @@ -20,8 +20,6 @@ import org.elasticsearch.watcher.watch.Watch; import org.junit.Test; import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope; -import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope; import static org.elasticsearch.watcher.actions.ActionBuilders.loggingAction; import static org.elasticsearch.watcher.client.WatchSourceBuilders.watchBuilder; import static org.elasticsearch.watcher.condition.ConditionBuilders.alwaysCondition; @@ -31,7 +29,6 @@ import static org.elasticsearch.watcher.trigger.TriggerBuilders.schedule; import static org.elasticsearch.watcher.trigger.schedule.Schedules.cron; import static org.hamcrest.Matchers.*; -@ClusterScope(scope = Scope.SUITE, randomDynamicTemplates = false) public class ManualExecutionTests extends AbstractWatcherIntegrationTests { @Override diff --git a/src/test/java/org/elasticsearch/watcher/test/AbstractWatcherIntegrationTests.java b/src/test/java/org/elasticsearch/watcher/test/AbstractWatcherIntegrationTests.java index 5277ac7f98d..f0ba1166f63 100644 --- a/src/test/java/org/elasticsearch/watcher/test/AbstractWatcherIntegrationTests.java +++ b/src/test/java/org/elasticsearch/watcher/test/AbstractWatcherIntegrationTests.java @@ -85,12 +85,19 @@ public abstract class AbstractWatcherIntegrationTests extends ElasticsearchInteg private TimeWarp timeWarp; - boolean shieldEnabled = enableShield(); + private static Boolean shieldEnabled; - final ScheduleModule.Engine scheduleEngine = randomFrom(ScheduleModule.Engine.values()); + private static ScheduleModule.Engine scheduleEngine; @Override protected Settings nodeSettings(int nodeOrdinal) { + if (scheduleEngine == null) { + scheduleEngine = randomFrom(ScheduleModule.Engine.values()); + } + if (shieldEnabled == null) { + shieldEnabled = enableShield(); + } + String scheduleImplName = scheduleEngine().name().toLowerCase(Locale.ROOT); logger.info("using schedule engine [" + scheduleImplName + "]"); return ImmutableSettings.builder() @@ -118,14 +125,14 @@ public abstract class AbstractWatcherIntegrationTests extends ElasticsearchInteg /** * @return whether shield has been enabled */ - protected boolean shieldEnabled() { + protected final boolean shieldEnabled() { return shieldEnabled; } /** * @return The schedule trigger engine that will be used for the nodes. */ - protected ScheduleModule.Engine scheduleEngine() { + protected final ScheduleModule.Engine scheduleEngine() { return scheduleEngine; } diff --git a/src/test/java/org/elasticsearch/watcher/test/integration/HttpInputIntegrationTest.java b/src/test/java/org/elasticsearch/watcher/test/integration/HttpInputIntegrationTest.java index 4a4059a7f0d..07c58f15d54 100644 --- a/src/test/java/org/elasticsearch/watcher/test/integration/HttpInputIntegrationTest.java +++ b/src/test/java/org/elasticsearch/watcher/test/integration/HttpInputIntegrationTest.java @@ -36,8 +36,6 @@ import static org.elasticsearch.watcher.trigger.TriggerBuilders.schedule; import static org.elasticsearch.watcher.trigger.schedule.Schedules.interval; import static org.hamcrest.Matchers.equalTo; -/** - */ public class HttpInputIntegrationTest extends AbstractWatcherIntegrationTests { @Override