From 08698fda291eefa5ed378acf3b2a977e58db6232 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Thu, 17 Sep 2015 14:37:09 +0200 Subject: [PATCH] test: don't remove the watcher templates in between tests Original commit: elastic/x-pack-elasticsearch@652c8d16ec2fed023d5ca083720203165addae9b --- .../AbstractWatcherIntegrationTestCase.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/watcher/src/test/java/org/elasticsearch/watcher/test/AbstractWatcherIntegrationTestCase.java b/watcher/src/test/java/org/elasticsearch/watcher/test/AbstractWatcherIntegrationTestCase.java index f64916b3021..dd26d5cf9fe 100644 --- a/watcher/src/test/java/org/elasticsearch/watcher/test/AbstractWatcherIntegrationTestCase.java +++ b/watcher/src/test/java/org/elasticsearch/watcher/test/AbstractWatcherIntegrationTestCase.java @@ -34,10 +34,7 @@ import org.elasticsearch.shield.crypto.InternalCryptoService; import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.test.ESIntegTestCase.ClusterScope; import org.elasticsearch.test.TestCluster; -import org.elasticsearch.watcher.WatcherLifeCycleService; -import org.elasticsearch.watcher.WatcherPlugin; -import org.elasticsearch.watcher.WatcherService; -import org.elasticsearch.watcher.WatcherState; +import org.elasticsearch.watcher.*; import org.elasticsearch.watcher.actions.email.service.Authentication; import org.elasticsearch.watcher.actions.email.service.Email; import org.elasticsearch.watcher.actions.email.service.EmailService; @@ -45,8 +42,10 @@ import org.elasticsearch.watcher.actions.email.service.Profile; import org.elasticsearch.watcher.client.WatcherClient; import org.elasticsearch.watcher.execution.ExecutionService; import org.elasticsearch.watcher.execution.ExecutionState; +import org.elasticsearch.watcher.execution.TriggeredWatchStore; import org.elasticsearch.watcher.history.HistoryStore; import org.elasticsearch.watcher.license.LicenseService; +import org.elasticsearch.watcher.support.WatcherIndexTemplateRegistry; import org.elasticsearch.watcher.support.clock.ClockMock; import org.elasticsearch.watcher.support.http.HttpClient; import org.elasticsearch.watcher.support.init.proxy.ScriptServiceProxy; @@ -55,6 +54,7 @@ import org.elasticsearch.watcher.trigger.ScheduleTriggerEngineMock; import org.elasticsearch.watcher.trigger.TriggerService; import org.elasticsearch.watcher.trigger.schedule.ScheduleModule; import org.elasticsearch.watcher.watch.Watch; +import org.elasticsearch.watcher.watch.WatchStore; import org.hamcrest.Matcher; import org.jboss.netty.util.internal.SystemPropertyUtil; import org.junit.After; @@ -114,6 +114,15 @@ public abstract class AbstractWatcherIntegrationTestCase extends ESIntegTestCase .build(); } + @Override + protected Set excludeTemplates() { + Set excludes = new HashSet<>(); + for (WatcherIndexTemplateRegistry.TemplateConfig templateConfig : WatcherModule.TEMPLATE_CONFIGS) { + excludes.add(templateConfig.getTemplateName()); + } + return excludes; + } + @Override protected Collection> nodePlugins() { return pluginTypes();