From 5af8412fc90d7e6584f9e4e77899d1a06afeaaa6 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Tue, 26 May 2015 09:32:38 -0400 Subject: [PATCH] Absorb ImmutableSettings into Settings --- .../script/javascript/JavaScriptScriptEngineTests.java | 4 ++-- .../javascript/JavaScriptScriptMultiThreadedTest.java | 8 ++++---- .../script/javascript/JavaScriptScriptSearchTests.java | 3 +-- .../org/elasticsearch/script/javascript/SimpleBench.java | 4 ++-- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/test/java/org/elasticsearch/script/javascript/JavaScriptScriptEngineTests.java b/src/test/java/org/elasticsearch/script/javascript/JavaScriptScriptEngineTests.java index e343de9159b..a4e43a97f29 100644 --- a/src/test/java/org/elasticsearch/script/javascript/JavaScriptScriptEngineTests.java +++ b/src/test/java/org/elasticsearch/script/javascript/JavaScriptScriptEngineTests.java @@ -21,7 +21,7 @@ package org.elasticsearch.script.javascript; import org.elasticsearch.common.collect.Lists; import org.elasticsearch.common.collect.MapBuilder; -import org.elasticsearch.common.settings.ImmutableSettings; +import org.elasticsearch.common.settings.Settings; import org.elasticsearch.script.ExecutableScript; import org.elasticsearch.test.ElasticsearchTestCase; import org.junit.After; @@ -44,7 +44,7 @@ public class JavaScriptScriptEngineTests extends ElasticsearchTestCase { @Before public void setup() { - se = new JavaScriptScriptEngineService(ImmutableSettings.Builder.EMPTY_SETTINGS); + se = new JavaScriptScriptEngineService(Settings.Builder.EMPTY_SETTINGS); } @After diff --git a/src/test/java/org/elasticsearch/script/javascript/JavaScriptScriptMultiThreadedTest.java b/src/test/java/org/elasticsearch/script/javascript/JavaScriptScriptMultiThreadedTest.java index 381de8e5645..c235128e83f 100644 --- a/src/test/java/org/elasticsearch/script/javascript/JavaScriptScriptMultiThreadedTest.java +++ b/src/test/java/org/elasticsearch/script/javascript/JavaScriptScriptMultiThreadedTest.java @@ -19,7 +19,7 @@ package org.elasticsearch.script.javascript; -import org.elasticsearch.common.settings.ImmutableSettings; +import org.elasticsearch.common.settings.Settings; import org.elasticsearch.script.ExecutableScript; import org.elasticsearch.test.ElasticsearchTestCase; import org.junit.Test; @@ -40,7 +40,7 @@ public class JavaScriptScriptMultiThreadedTest extends ElasticsearchTestCase { @Test public void testExecutableNoRuntimeParams() throws Exception { - final JavaScriptScriptEngineService se = new JavaScriptScriptEngineService(ImmutableSettings.Builder.EMPTY_SETTINGS); + final JavaScriptScriptEngineService se = new JavaScriptScriptEngineService(Settings.Builder.EMPTY_SETTINGS); final Object compiled = se.compile("x + y"); final AtomicBoolean failed = new AtomicBoolean(); @@ -84,7 +84,7 @@ public class JavaScriptScriptMultiThreadedTest extends ElasticsearchTestCase { @Test public void testExecutableWithRuntimeParams() throws Exception { - final JavaScriptScriptEngineService se = new JavaScriptScriptEngineService(ImmutableSettings.Builder.EMPTY_SETTINGS); + final JavaScriptScriptEngineService se = new JavaScriptScriptEngineService(Settings.Builder.EMPTY_SETTINGS); final Object compiled = se.compile("x + y"); final AtomicBoolean failed = new AtomicBoolean(); @@ -127,7 +127,7 @@ public class JavaScriptScriptMultiThreadedTest extends ElasticsearchTestCase { @Test public void testExecute() throws Exception { - final JavaScriptScriptEngineService se = new JavaScriptScriptEngineService(ImmutableSettings.Builder.EMPTY_SETTINGS); + final JavaScriptScriptEngineService se = new JavaScriptScriptEngineService(Settings.Builder.EMPTY_SETTINGS); final Object compiled = se.compile("x + y"); final AtomicBoolean failed = new AtomicBoolean(); diff --git a/src/test/java/org/elasticsearch/script/javascript/JavaScriptScriptSearchTests.java b/src/test/java/org/elasticsearch/script/javascript/JavaScriptScriptSearchTests.java index 6324dd44334..53cf8d198da 100644 --- a/src/test/java/org/elasticsearch/script/javascript/JavaScriptScriptSearchTests.java +++ b/src/test/java/org/elasticsearch/script/javascript/JavaScriptScriptSearchTests.java @@ -21,7 +21,6 @@ package org.elasticsearch.script.javascript; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.action.search.SearchType; -import org.elasticsearch.common.settings.ImmutableSettings; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders; import org.elasticsearch.plugins.PluginsService; @@ -54,7 +53,7 @@ public class JavaScriptScriptSearchTests extends ElasticsearchIntegrationTest { @Override protected Settings nodeSettings(int nodeOrdinal) { - return ImmutableSettings.builder() + return Settings.builder() .put(super.nodeSettings(nodeOrdinal)) .put("plugins." + PluginsService.LOAD_PLUGIN_FROM_CLASSPATH, true) .build(); diff --git a/src/test/java/org/elasticsearch/script/javascript/SimpleBench.java b/src/test/java/org/elasticsearch/script/javascript/SimpleBench.java index 49f8e401074..e0b47c8a919 100644 --- a/src/test/java/org/elasticsearch/script/javascript/SimpleBench.java +++ b/src/test/java/org/elasticsearch/script/javascript/SimpleBench.java @@ -20,7 +20,7 @@ package org.elasticsearch.script.javascript; import org.elasticsearch.common.StopWatch; -import org.elasticsearch.common.settings.ImmutableSettings; +import org.elasticsearch.common.settings.Settings; import org.elasticsearch.script.ExecutableScript; import java.util.HashMap; @@ -32,7 +32,7 @@ import java.util.Map; public class SimpleBench { public static void main(String[] args) { - JavaScriptScriptEngineService se = new JavaScriptScriptEngineService(ImmutableSettings.Builder.EMPTY_SETTINGS); + JavaScriptScriptEngineService se = new JavaScriptScriptEngineService(Settings.Builder.EMPTY_SETTINGS); Object compiled = se.compile("x + y"); Map vars = new HashMap();