diff --git a/plugin/src/test/java/org/elasticsearch/script/LatchScriptEngine.java b/plugin/src/test/java/org/elasticsearch/script/LatchScriptEngine.java index b06c76f461f..395b65165b0 100644 --- a/plugin/src/test/java/org/elasticsearch/script/LatchScriptEngine.java +++ b/plugin/src/test/java/org/elasticsearch/script/LatchScriptEngine.java @@ -24,7 +24,7 @@ import java.util.concurrent.TimeUnit; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; -public class LatchScriptEngine implements ScriptEngineService { +public class LatchScriptEngine implements ScriptEngine { private static final String NAME = "latch"; private static final LatchScriptEngine INSTANCE = new LatchScriptEngine(); @@ -103,7 +103,7 @@ public class LatchScriptEngine implements ScriptEngineService { public static class LatchScriptPlugin extends Plugin implements ScriptPlugin { @Override - public ScriptEngineService getScriptEngineService(Settings settings) { + public ScriptEngine getScriptEngine(Settings settings) { return INSTANCE; } diff --git a/plugin/src/test/java/org/elasticsearch/script/MockMustacheScriptEngine.java b/plugin/src/test/java/org/elasticsearch/script/MockMustacheScriptEngine.java index 7aa2b7fee93..d1bf003da0b 100644 --- a/plugin/src/test/java/org/elasticsearch/script/MockMustacheScriptEngine.java +++ b/plugin/src/test/java/org/elasticsearch/script/MockMustacheScriptEngine.java @@ -23,7 +23,7 @@ public class MockMustacheScriptEngine extends MockScriptEngine { public static class TestPlugin extends MockScriptPlugin { @Override - public ScriptEngineService getScriptEngineService(Settings settings) { + public ScriptEngine getScriptEngine(Settings settings) { return new MockMustacheScriptEngine(); } diff --git a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/test/MockPainlessScriptEngine.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/test/MockPainlessScriptEngine.java index 19857353641..7a042bc33c5 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/test/MockPainlessScriptEngine.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/test/MockPainlessScriptEngine.java @@ -8,7 +8,7 @@ package org.elasticsearch.xpack.monitoring.test; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.script.MockScriptEngine; import org.elasticsearch.script.MockScriptPlugin; -import org.elasticsearch.script.ScriptEngineService; +import org.elasticsearch.script.ScriptEngine; import java.util.Collections; import java.util.Map; @@ -23,7 +23,7 @@ public class MockPainlessScriptEngine extends MockScriptEngine { public static class TestPlugin extends MockScriptPlugin { @Override - public ScriptEngineService getScriptEngineService(Settings settings) { + public ScriptEngine getScriptEngine(Settings settings) { return new MockPainlessScriptEngine(); } diff --git a/plugin/src/test/java/org/elasticsearch/xpack/watcher/condition/ScriptConditionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/condition/ScriptConditionTests.java index c338435c951..f45b63ef417 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/watcher/condition/ScriptConditionTests.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/watcher/condition/ScriptConditionTests.java @@ -24,8 +24,8 @@ import org.elasticsearch.script.MockScriptEngine; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptContext; import org.elasticsearch.script.ScriptContextRegistry; +import org.elasticsearch.script.ScriptEngine; import org.elasticsearch.script.ScriptEngineRegistry; -import org.elasticsearch.script.ScriptEngineService; import org.elasticsearch.script.ScriptException; import org.elasticsearch.script.ScriptMetaData; import org.elasticsearch.script.ScriptService; @@ -50,7 +50,6 @@ import static java.util.Collections.emptyList; import static java.util.Collections.singleton; import static java.util.Collections.singletonMap; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.script.ScriptService.SCRIPT_AUTO_RELOAD_ENABLED_SETTING; import static org.elasticsearch.xpack.watcher.support.Exceptions.illegalArgument; import static org.elasticsearch.xpack.watcher.test.WatcherTestUtils.mockExecutionContext; import static org.hamcrest.Matchers.containsString; @@ -87,7 +86,7 @@ public class ScriptConditionTests extends ESTestCase { return total > threshold; }); - ScriptEngineService engine = new MockScriptEngine(MockScriptEngine.NAME, scripts); + ScriptEngine engine = new MockScriptEngine(MockScriptEngine.NAME, scripts); ScriptEngineRegistry registry = new ScriptEngineRegistry(singleton(engine)); ScriptContextRegistry contextRegistry = new ScriptContextRegistry(singleton(new ScriptContext.Plugin("xpack", "watch"))); diff --git a/qa/smoke-test-watcher-with-mustache/src/test/java/org/elasticsearch/smoketest/WatcherTemplateIT.java b/qa/smoke-test-watcher-with-mustache/src/test/java/org/elasticsearch/smoketest/WatcherTemplateIT.java index 8894a9b8d8a..83fdaa3e007 100644 --- a/qa/smoke-test-watcher-with-mustache/src/test/java/org/elasticsearch/smoketest/WatcherTemplateIT.java +++ b/qa/smoke-test-watcher-with-mustache/src/test/java/org/elasticsearch/smoketest/WatcherTemplateIT.java @@ -16,7 +16,7 @@ import org.elasticsearch.script.ScriptContextRegistry; import org.elasticsearch.script.ScriptEngineRegistry; import org.elasticsearch.script.ScriptService; import org.elasticsearch.script.ScriptSettings; -import org.elasticsearch.script.mustache.MustacheScriptEngineService; +import org.elasticsearch.script.mustache.MustacheScriptEngine; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.watcher.ResourceWatcherService; import org.elasticsearch.xpack.common.text.TextTemplate; @@ -47,7 +47,7 @@ public class WatcherTemplateIT extends ESTestCase { ScriptContextRegistry registry = new ScriptContextRegistry(Collections.singletonList(new ScriptContext.Plugin("xpack", "watch"))); ScriptEngineRegistry scriptEngineRegistry = new ScriptEngineRegistry( - Collections.singleton(new MustacheScriptEngineService()) + Collections.singleton(new MustacheScriptEngine()) ); ScriptSettings scriptSettings = new ScriptSettings(scriptEngineRegistry, registry); ScriptService scriptService = new ScriptService(setting, environment, resourceWatcherService, scriptEngineRegistry,