Skip to content

Commit 5af8412

Browse files
committed
Absorb ImmutableSettings into Settings
1 parent ee179af commit 5af8412

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

src/test/java/org/elasticsearch/script/javascript/JavaScriptScriptEngineTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
import org.elasticsearch.common.collect.Lists;
2323
import org.elasticsearch.common.collect.MapBuilder;
24-
import org.elasticsearch.common.settings.ImmutableSettings;
24+
import org.elasticsearch.common.settings.Settings;
2525
import org.elasticsearch.script.ExecutableScript;
2626
import org.elasticsearch.test.ElasticsearchTestCase;
2727
import org.junit.After;
@@ -44,7 +44,7 @@ public class JavaScriptScriptEngineTests extends ElasticsearchTestCase {
4444

4545
@Before
4646
public void setup() {
47-
se = new JavaScriptScriptEngineService(ImmutableSettings.Builder.EMPTY_SETTINGS);
47+
se = new JavaScriptScriptEngineService(Settings.Builder.EMPTY_SETTINGS);
4848
}
4949

5050
@After

src/test/java/org/elasticsearch/script/javascript/JavaScriptScriptMultiThreadedTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
package org.elasticsearch.script.javascript;
2121

22-
import org.elasticsearch.common.settings.ImmutableSettings;
22+
import org.elasticsearch.common.settings.Settings;
2323
import org.elasticsearch.script.ExecutableScript;
2424
import org.elasticsearch.test.ElasticsearchTestCase;
2525
import org.junit.Test;
@@ -40,7 +40,7 @@ public class JavaScriptScriptMultiThreadedTest extends ElasticsearchTestCase {
4040

4141
@Test
4242
public void testExecutableNoRuntimeParams() throws Exception {
43-
final JavaScriptScriptEngineService se = new JavaScriptScriptEngineService(ImmutableSettings.Builder.EMPTY_SETTINGS);
43+
final JavaScriptScriptEngineService se = new JavaScriptScriptEngineService(Settings.Builder.EMPTY_SETTINGS);
4444
final Object compiled = se.compile("x + y");
4545
final AtomicBoolean failed = new AtomicBoolean();
4646

@@ -84,7 +84,7 @@ public void run() {
8484

8585
@Test
8686
public void testExecutableWithRuntimeParams() throws Exception {
87-
final JavaScriptScriptEngineService se = new JavaScriptScriptEngineService(ImmutableSettings.Builder.EMPTY_SETTINGS);
87+
final JavaScriptScriptEngineService se = new JavaScriptScriptEngineService(Settings.Builder.EMPTY_SETTINGS);
8888
final Object compiled = se.compile("x + y");
8989
final AtomicBoolean failed = new AtomicBoolean();
9090

@@ -127,7 +127,7 @@ public void run() {
127127

128128
@Test
129129
public void testExecute() throws Exception {
130-
final JavaScriptScriptEngineService se = new JavaScriptScriptEngineService(ImmutableSettings.Builder.EMPTY_SETTINGS);
130+
final JavaScriptScriptEngineService se = new JavaScriptScriptEngineService(Settings.Builder.EMPTY_SETTINGS);
131131
final Object compiled = se.compile("x + y");
132132
final AtomicBoolean failed = new AtomicBoolean();
133133

src/test/java/org/elasticsearch/script/javascript/JavaScriptScriptSearchTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
import org.elasticsearch.action.search.SearchResponse;
2323
import org.elasticsearch.action.search.SearchType;
24-
import org.elasticsearch.common.settings.ImmutableSettings;
2524
import org.elasticsearch.common.settings.Settings;
2625
import org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders;
2726
import org.elasticsearch.plugins.PluginsService;
@@ -54,7 +53,7 @@ public class JavaScriptScriptSearchTests extends ElasticsearchIntegrationTest {
5453

5554
@Override
5655
protected Settings nodeSettings(int nodeOrdinal) {
57-
return ImmutableSettings.builder()
56+
return Settings.builder()
5857
.put(super.nodeSettings(nodeOrdinal))
5958
.put("plugins." + PluginsService.LOAD_PLUGIN_FROM_CLASSPATH, true)
6059
.build();

src/test/java/org/elasticsearch/script/javascript/SimpleBench.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
package org.elasticsearch.script.javascript;
2121

2222
import org.elasticsearch.common.StopWatch;
23-
import org.elasticsearch.common.settings.ImmutableSettings;
23+
import org.elasticsearch.common.settings.Settings;
2424
import org.elasticsearch.script.ExecutableScript;
2525

2626
import java.util.HashMap;
@@ -32,7 +32,7 @@
3232
public class SimpleBench {
3333

3434
public static void main(String[] args) {
35-
JavaScriptScriptEngineService se = new JavaScriptScriptEngineService(ImmutableSettings.Builder.EMPTY_SETTINGS);
35+
JavaScriptScriptEngineService se = new JavaScriptScriptEngineService(Settings.Builder.EMPTY_SETTINGS);
3636
Object compiled = se.compile("x + y");
3737

3838
Map<String, Object> vars = new HashMap<String, Object>();

0 commit comments

Comments
 (0)