From 284cc3a04813aae1b276dc7a6bacd06654277f99 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Tue, 26 Jan 2016 17:13:06 -0500 Subject: [PATCH] Script mode settings as booleans This commit modifies the accept values for script mode settings from "on", "off", and "sandbox" to "true", "false", and "sandbox". --- .../org/elasticsearch/script/ScriptMode.java | 4 +- .../elasticsearch/script/ScriptService.java | 2 +- .../elasticsearch/script/ScriptSettings.java | 4 +- .../elasticsearch/script/FileScriptTests.java | 4 +- .../script/ScriptContextTests.java | 4 +- .../script/ScriptModesTests.java | 6 +-- .../script/ScriptServiceTests.java | 16 +++---- .../FunctionScoreBackwardCompatibilityIT.java | 2 +- dev-tools/smoke_test_rc.py | 2 +- docs/reference/migration/migrate_3_0.asciidoc | 6 +-- docs/reference/modules/scripting.asciidoc | 44 +++++++++---------- .../expression/IndexedExpressionTests.java | 6 +-- modules/lang-groovy/build.gradle | 4 +- .../tests/ContextAndHeaderTransportTests.java | 2 +- .../messy/tests/IndexedScriptTests.java | 14 +++--- modules/lang-mustache/build.gradle | 4 +- .../tests/ContextAndHeaderTransportTests.java | 2 +- plugins/lang-javascript/build.gradle | 4 +- plugins/lang-python/build.gradle | 4 +- .../elasticsearch/test/ESIntegTestCase.java | 4 +- .../test/ESSingleNodeTestCase.java | 4 +- 21 files changed, 71 insertions(+), 71 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/script/ScriptMode.java b/core/src/main/java/org/elasticsearch/script/ScriptMode.java index 12caf7a0878..aa9d100d43b 100644 --- a/core/src/main/java/org/elasticsearch/script/ScriptMode.java +++ b/core/src/main/java/org/elasticsearch/script/ScriptMode.java @@ -28,8 +28,8 @@ import java.util.Map; * only be executed by a sandboxed scripting language. */ enum ScriptMode { - ON("on"), - OFF("off"), + ON("true"), + OFF("false"), SANDBOX("sandbox"); private final String mode; diff --git a/core/src/main/java/org/elasticsearch/script/ScriptService.java b/core/src/main/java/org/elasticsearch/script/ScriptService.java index 396a58beedf..f16c45d630e 100644 --- a/core/src/main/java/org/elasticsearch/script/ScriptService.java +++ b/core/src/main/java/org/elasticsearch/script/ScriptService.java @@ -145,7 +145,7 @@ public class ScriptService extends AbstractComponent implements Closeable { this.parseFieldMatcher = new ParseFieldMatcher(settings); if (Strings.hasLength(settings.get(DISABLE_DYNAMIC_SCRIPTING_SETTING))) { throw new IllegalArgumentException(DISABLE_DYNAMIC_SCRIPTING_SETTING + " is not a supported setting, replace with fine-grained script settings. \n" + - "Dynamic scripts can be enabled for all languages and all operations by replacing `script.disable_dynamic: false` with `script.inline: on` and `script.indexed: on` in elasticsearch.yml"); + "Dynamic scripts can be enabled for all languages and all operations by replacing `script.disable_dynamic: false` with `script.inline: true` and `script.indexed: true` in elasticsearch.yml"); } this.scriptEngines = scriptEngines; diff --git a/core/src/main/java/org/elasticsearch/script/ScriptSettings.java b/core/src/main/java/org/elasticsearch/script/ScriptSettings.java index b593a327a43..8ececfe25bb 100644 --- a/core/src/main/java/org/elasticsearch/script/ScriptSettings.java +++ b/core/src/main/java/org/elasticsearch/script/ScriptSettings.java @@ -117,13 +117,13 @@ public class ScriptSettings { return languageSettings.keySet().iterator().next(); } - // the next fallback is global operation-based settings (e.g., "script.aggs: off") + // the next fallback is global operation-based settings (e.g., "script.aggs: false") Setting setting = scriptContextSettingMap.get(scriptContext); if (setting.exists(settings)) { return setting.get(settings).getMode(); } - // the next fallback is global source-based settings (e.g., "script.inline: off") + // the next fallback is global source-based settings (e.g., "script.inline: false") Setting scriptTypeSetting = scriptTypeSettingMap.get(scriptType); if (scriptTypeSetting.exists(settings)) { return scriptTypeSetting.get(settings).getMode(); diff --git a/core/src/test/java/org/elasticsearch/script/FileScriptTests.java b/core/src/test/java/org/elasticsearch/script/FileScriptTests.java index 5e8db069dd8..9a936b7f7eb 100644 --- a/core/src/test/java/org/elasticsearch/script/FileScriptTests.java +++ b/core/src/test/java/org/elasticsearch/script/FileScriptTests.java @@ -54,7 +54,7 @@ public class FileScriptTests extends ESTestCase { public void testFileScriptFound() throws Exception { ContextAndHeaderHolder contextAndHeaders = new ContextAndHeaderHolder(); Settings settings = Settings.builder() - .put("script.engine." + MockScriptEngine.NAME + ".file.aggs", "off").build(); + .put("script.engine." + MockScriptEngine.NAME + ".file.aggs", "false").build(); ScriptService scriptService = makeScriptService(settings); Script script = new Script("script1", ScriptService.ScriptType.FILE, MockScriptEngine.NAME, null); assertNotNull(scriptService.compile(script, ScriptContext.Standard.SEARCH, contextAndHeaders, Collections.emptyMap())); @@ -67,7 +67,7 @@ public class FileScriptTests extends ESTestCase { .put("script.engine." + MockScriptEngine.NAME + ".file.search", "false") .put("script.engine." + MockScriptEngine.NAME + ".file.mapping", "false") .put("script.engine." + MockScriptEngine.NAME + ".file.update", "false") - .put("script.engine." + MockScriptEngine.NAME + ".file.ingest", false).build(); + .put("script.engine." + MockScriptEngine.NAME + ".file.ingest", "false").build(); ScriptService scriptService = makeScriptService(settings); Script script = new Script("script1", ScriptService.ScriptType.FILE, MockScriptEngine.NAME, null); for (ScriptContext context : ScriptContext.Standard.values()) { diff --git a/core/src/test/java/org/elasticsearch/script/ScriptContextTests.java b/core/src/test/java/org/elasticsearch/script/ScriptContextTests.java index b8622f1872c..3cf4fde01da 100644 --- a/core/src/test/java/org/elasticsearch/script/ScriptContextTests.java +++ b/core/src/test/java/org/elasticsearch/script/ScriptContextTests.java @@ -41,8 +41,8 @@ public class ScriptContextTests extends ESTestCase { .put(Environment.PATH_HOME_SETTING.getKey(), createTempDir()) // no file watching, so we don't need a ResourceWatcherService .put(ScriptService.SCRIPT_AUTO_RELOAD_ENABLED_SETTING.getKey(), "off") - .put("script." + PLUGIN_NAME + "_custom_globally_disabled_op", "off") - .put("script.engine." + MockScriptEngine.NAME + ".inline." + PLUGIN_NAME + "_custom_exp_disabled_op", "off") + .put("script." + PLUGIN_NAME + "_custom_globally_disabled_op", "false") + .put("script.engine." + MockScriptEngine.NAME + ".inline." + PLUGIN_NAME + "_custom_exp_disabled_op", "false") .build(); Set engines = new HashSet<>(Collections.singletonList(new MockScriptEngine())); ScriptEngineRegistry scriptEngineRegistry = new ScriptEngineRegistry(Collections.singletonList(new ScriptEngineRegistry.ScriptEngineRegistration(MockScriptEngine.class, MockScriptEngine.TYPES))); diff --git a/core/src/test/java/org/elasticsearch/script/ScriptModesTests.java b/core/src/test/java/org/elasticsearch/script/ScriptModesTests.java index 1696a3e44f9..305cfc183e6 100644 --- a/core/src/test/java/org/elasticsearch/script/ScriptModesTests.java +++ b/core/src/test/java/org/elasticsearch/script/ScriptModesTests.java @@ -47,8 +47,8 @@ public class ScriptModesTests extends ESTestCase { private static final Set ALL_LANGS = unmodifiableSet( newHashSet("custom", "test")); - static final String[] ENABLE_VALUES = new String[]{"on"}; - static final String[] DISABLE_VALUES = new String[]{"off"}; + static final String[] ENABLE_VALUES = new String[]{"true"}; + static final String[] DISABLE_VALUES = new String[]{"false"}; ScriptSettings scriptSettings; ScriptContextRegistry scriptContextRegistry; @@ -185,7 +185,7 @@ public class ScriptModesTests extends ESTestCase { public void testConflictingScriptTypeAndOpGenericSettings() { ScriptContext scriptContext = randomFrom(scriptContexts); Settings.Builder builder = Settings.builder().put("script" + "." + scriptContext.getKey(), randomFrom(DISABLE_VALUES)) - .put("script.indexed", randomFrom(ENABLE_VALUES)).put("script.inline", ScriptMode.SANDBOX); + .put("script.indexed", randomFrom(ENABLE_VALUES)).put("script.inline", "sandbox"); //operations generic settings have precedence over script type generic settings this.scriptModes = new ScriptModes(scriptSettings, builder.build()); assertScriptModesAllTypes(ScriptMode.OFF, ALL_LANGS, scriptContext); diff --git a/core/src/test/java/org/elasticsearch/script/ScriptServiceTests.java b/core/src/test/java/org/elasticsearch/script/ScriptServiceTests.java index 085bc91489c..a725d22de4a 100644 --- a/core/src/test/java/org/elasticsearch/script/ScriptServiceTests.java +++ b/core/src/test/java/org/elasticsearch/script/ScriptServiceTests.java @@ -193,10 +193,10 @@ public class ScriptServiceTests extends ESTestCase { builder.put("script.file", randomFrom(ScriptModesTests.ENABLE_VALUES)); } if (rarely()) { - builder.put("script.indexed", ScriptMode.SANDBOX); + builder.put("script.indexed", "sandbox"); } if (rarely()) { - builder.put("script.inline", ScriptMode.SANDBOX); + builder.put("script.inline", "sandbox"); } buildScriptService(builder.build()); createFileScripts("groovy", "mustache", "test"); @@ -246,10 +246,10 @@ public class ScriptServiceTests extends ESTestCase { for (Map.Entry entry : scriptSourceSettings.entrySet()) { switch (entry.getValue()) { case ON: - builder.put("script" + "." + entry.getKey().getScriptType(), "on"); + builder.put("script" + "." + entry.getKey().getScriptType(), "true"); break; case OFF: - builder.put("script" + "." + entry.getKey().getScriptType(), "off"); + builder.put("script" + "." + entry.getKey().getScriptType(), "false"); break; case SANDBOX: builder.put("script" + "." + entry.getKey().getScriptType(), "sandbox"); @@ -259,11 +259,11 @@ public class ScriptServiceTests extends ESTestCase { for (Map.Entry entry : scriptContextSettings.entrySet()) { switch (entry.getValue()) { case ON: - builder.put("script" + "." + entry.getKey().getKey(), "on"); + builder.put("script" + "." + entry.getKey().getKey(), "true"); break; case OFF: - builder.put("script" + "." + entry.getKey().getKey(), "off"); + builder.put("script" + "." + entry.getKey().getKey(), "false"); break; case SANDBOX: builder.put("script" + "." + entry.getKey().getKey(), "sandbox"); @@ -278,10 +278,10 @@ public class ScriptServiceTests extends ESTestCase { String lang = randomFrom(scriptEnginesByLangMap.get(part1).getTypes()); switch (entry.getValue()) { case ON: - builder.put("script.engine" + "." + lang + "." + part2, "on"); + builder.put("script.engine" + "." + lang + "." + part2, "true"); break; case OFF: - builder.put("script.engine" + "." + lang + "." + part2, "off"); + builder.put("script.engine" + "." + lang + "." + part2, "false"); break; case SANDBOX: builder.put("script.engine" + "." + lang + "." + part2, "sandbox"); diff --git a/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreBackwardCompatibilityIT.java b/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreBackwardCompatibilityIT.java index db5f1ed70e1..2e7a0a2329d 100644 --- a/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreBackwardCompatibilityIT.java +++ b/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreBackwardCompatibilityIT.java @@ -104,7 +104,7 @@ public class FunctionScoreBackwardCompatibilityIT extends ESBackcompatTestCase { @Override protected Settings commonNodeSettings(int nodeOrdinal) { return Settings.builder().put(super.commonNodeSettings(nodeOrdinal)) - .put("script.inline", "on").build(); + .put("script.inline", "true").build(); } private void checkFunctionScoreStillWorks(String... ids) throws ExecutionException, InterruptedException, IOException { diff --git a/dev-tools/smoke_test_rc.py b/dev-tools/smoke_test_rc.py index 5a94377407d..bc7b99cb452 100644 --- a/dev-tools/smoke_test_rc.py +++ b/dev-tools/smoke_test_rc.py @@ -194,7 +194,7 @@ def smoke_test_release(release, files, expected_hash, plugins): headers = {} print(' Starting elasticsearch deamon from [%s]' % os.path.join(tmp_dir, 'elasticsearch-%s' % release)) try: - run('%s; %s -Des.node.name=smoke_tester -Des.cluster.name=prepare_release -Des.script.inline=on -Des.script.indexed=on -Des.repositories.url.allowed_urls=http://snapshot.test* %s -Des.pidfile=%s' + run('%s; %s -Des.node.name=smoke_tester -Des.cluster.name=prepare_release -Des.script.inline=true -Des.script.indexed=true -Des.repositories.url.allowed_urls=http://snapshot.test* %s -Des.pidfile=%s' % (java_exe(), es_run_path, '-d', os.path.join(tmp_dir, 'elasticsearch-%s' % (release), 'es-smoke.pid'))) conn = HTTPConnection(host='127.0.0.1', port=9200, timeout=20) if not wait_for_node_startup(header=headers): diff --git a/docs/reference/migration/migrate_3_0.asciidoc b/docs/reference/migration/migrate_3_0.asciidoc index c53f29947a5..f3a6c54d766 100644 --- a/docs/reference/migration/migrate_3_0.asciidoc +++ b/docs/reference/migration/migrate_3_0.asciidoc @@ -691,9 +691,9 @@ settings can be modified by editing the elasticsearch.service file. ==== Script mode settings -Previously script mode settings (e.g., "script.inline: on", -"script.engine.groovy.inline.aggs: off", etc.) accepted the values +Previously script mode settings (e.g., "script.inline: true", +"script.engine.groovy.inline.aggs: false", etc.) accepted the values `on`, `true`, `1`, and `yes` for enabling a scripting mode, and the values `off`, `false`, `0`, and `no` for disabling a scripting mode. -The variants `true`, `1`, and `yes ` for enabling and `false`, `0`, +The variants `on`, `1`, and `yes ` for enabling and `off`, `0`, and `no` for disabling are no longer supported. diff --git a/docs/reference/modules/scripting.asciidoc b/docs/reference/modules/scripting.asciidoc index 56af524e171..4f9d84f34f8 100644 --- a/docs/reference/modules/scripting.asciidoc +++ b/docs/reference/modules/scripting.asciidoc @@ -244,8 +244,8 @@ every script engine, through the following settings that need to be added to the [source,yaml] ----------------------------------- -script.inline: on -script.indexed: on +script.inline: true +script.indexed: true ----------------------------------- @@ -261,8 +261,8 @@ script settings: [cols="<,<",options="header",] |======================================================================= |Value |Description -| `off` |scripting is turned off completely, in the context of the setting being set. -| `on` |scripting is turned on, in the context of the setting being set. +| `false` |scripting is turned off completely, in the context of the setting being set. +| `true` |scripting is turned on, in the context of the setting being set. | `sandbox` |scripts may be executed only for languages that are sandboxed |======================================================================= @@ -272,7 +272,7 @@ The default values are the following: ----------------------------------- script.inline: sandbox script.indexed: sandbox -script.file: on +script.file: true ----------------------------------- @@ -305,8 +305,8 @@ and plugins execution though, as the above defaults still get applied. [source,yaml] ----------------------------------- -script.update: off -script.mapping: off +script.update: false +script.mapping: false ----------------------------------- @@ -317,21 +317,21 @@ precedence over any other generic settings. [source,yaml] ----------------------------------- -script.engine.groovy.file.aggs: on -script.engine.groovy.file.mapping: on -script.engine.groovy.file.search: on -script.engine.groovy.file.update: on -script.engine.groovy.file.plugin: on -script.engine.groovy.indexed.aggs: on -script.engine.groovy.indexed.mapping: off -script.engine.groovy.indexed.search: on -script.engine.groovy.indexed.update: off -script.engine.groovy.indexed.plugin: off -script.engine.groovy.inline.aggs: on -script.engine.groovy.inline.mapping: off -script.engine.groovy.inline.search: off -script.engine.groovy.inline.update: off -script.engine.groovy.inline.plugin: off +script.engine.groovy.file.aggs: true +script.engine.groovy.file.mapping: true +script.engine.groovy.file.search: true +script.engine.groovy.file.update: true +script.engine.groovy.file.plugin: true +script.engine.groovy.indexed.aggs: true +script.engine.groovy.indexed.mapping: false +script.engine.groovy.indexed.search: true +script.engine.groovy.indexed.update: false +script.engine.groovy.indexed.plugin: false +script.engine.groovy.inline.aggs: true +script.engine.groovy.inline.mapping: false +script.engine.groovy.inline.search: false +script.engine.groovy.inline.update: false +script.engine.groovy.inline.plugin: false ----------------------------------- diff --git a/modules/lang-expression/src/test/java/org/elasticsearch/script/expression/IndexedExpressionTests.java b/modules/lang-expression/src/test/java/org/elasticsearch/script/expression/IndexedExpressionTests.java index a4fdb7d8eca..4246d34e3f5 100644 --- a/modules/lang-expression/src/test/java/org/elasticsearch/script/expression/IndexedExpressionTests.java +++ b/modules/lang-expression/src/test/java/org/elasticsearch/script/expression/IndexedExpressionTests.java @@ -39,9 +39,9 @@ public class IndexedExpressionTests extends ESIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { Settings.Builder builder = Settings.builder().put(super.nodeSettings(nodeOrdinal)); - builder.put("script.engine.expression.indexed.update", "off"); - builder.put("script.engine.expression.indexed.search", "off"); - builder.put("script.engine.expression.indexed.mapping", "off"); + builder.put("script.engine.expression.indexed.update", "false"); + builder.put("script.engine.expression.indexed.search", "false"); + builder.put("script.engine.expression.indexed.mapping", "false"); return builder.build(); } diff --git a/modules/lang-groovy/build.gradle b/modules/lang-groovy/build.gradle index 6f9b043d8bc..9216001e593 100644 --- a/modules/lang-groovy/build.gradle +++ b/modules/lang-groovy/build.gradle @@ -28,8 +28,8 @@ dependencies { integTest { cluster { - systemProperty 'es.script.inline', 'on' - systemProperty 'es.script.indexed', 'on' + systemProperty 'es.script.inline', 'true' + systemProperty 'es.script.indexed', 'true' } } diff --git a/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ContextAndHeaderTransportTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ContextAndHeaderTransportTests.java index fc19a956ff1..587be0956ca 100644 --- a/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ContextAndHeaderTransportTests.java +++ b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ContextAndHeaderTransportTests.java @@ -91,7 +91,7 @@ public class ContextAndHeaderTransportTests extends ESIntegTestCase { protected Settings nodeSettings(int nodeOrdinal) { return settingsBuilder() .put(super.nodeSettings(nodeOrdinal)) - .put("script.indexed", "on") + .put("script.indexed", "true") .put(NetworkModule.HTTP_ENABLED.getKey(), true) .build(); } diff --git a/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/IndexedScriptTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/IndexedScriptTests.java index 363193c6d6b..65b83a9be3c 100644 --- a/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/IndexedScriptTests.java +++ b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/IndexedScriptTests.java @@ -60,13 +60,13 @@ public class IndexedScriptTests extends ESIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { Settings.Builder builder = Settings.builder().put(super.nodeSettings(nodeOrdinal)); - builder.put("script.engine.groovy.indexed.update", "off"); - builder.put("script.engine.groovy.indexed.search", "on"); - builder.put("script.engine.groovy.indexed.aggs", "on"); - builder.put("script.engine.groovy.inline.aggs", "off"); - builder.put("script.engine.expression.indexed.update", "off"); - builder.put("script.engine.expression.indexed.search", "off"); - builder.put("script.engine.expression.indexed.mapping", "off"); + builder.put("script.engine.groovy.indexed.update", "false"); + builder.put("script.engine.groovy.indexed.search", "true"); + builder.put("script.engine.groovy.indexed.aggs", "true"); + builder.put("script.engine.groovy.inline.aggs", "false"); + builder.put("script.engine.expression.indexed.update", "false"); + builder.put("script.engine.expression.indexed.search", "false"); + builder.put("script.engine.expression.indexed.mapping", "false"); return builder.build(); } diff --git a/modules/lang-mustache/build.gradle b/modules/lang-mustache/build.gradle index 694ddc74606..f41ffb90128 100644 --- a/modules/lang-mustache/build.gradle +++ b/modules/lang-mustache/build.gradle @@ -28,7 +28,7 @@ dependencies { integTest { cluster { - systemProperty 'es.script.inline', 'on' - systemProperty 'es.script.indexed', 'on' + systemProperty 'es.script.inline', 'true' + systemProperty 'es.script.indexed', 'true' } } diff --git a/modules/lang-mustache/src/test/java/org/elasticsearch/messy/tests/ContextAndHeaderTransportTests.java b/modules/lang-mustache/src/test/java/org/elasticsearch/messy/tests/ContextAndHeaderTransportTests.java index d1275f63141..c40c2bded0a 100644 --- a/modules/lang-mustache/src/test/java/org/elasticsearch/messy/tests/ContextAndHeaderTransportTests.java +++ b/modules/lang-mustache/src/test/java/org/elasticsearch/messy/tests/ContextAndHeaderTransportTests.java @@ -86,7 +86,7 @@ public class ContextAndHeaderTransportTests extends ESIntegTestCase { protected Settings nodeSettings(int nodeOrdinal) { return settingsBuilder() .put(super.nodeSettings(nodeOrdinal)) - .put("script.indexed", "on") + .put("script.indexed", "true") .put(NetworkModule.HTTP_ENABLED.getKey(), true) .build(); } diff --git a/plugins/lang-javascript/build.gradle b/plugins/lang-javascript/build.gradle index cce5869341e..dae5204db20 100644 --- a/plugins/lang-javascript/build.gradle +++ b/plugins/lang-javascript/build.gradle @@ -28,7 +28,7 @@ dependencies { integTest { cluster { - systemProperty 'es.script.inline', 'on' - systemProperty 'es.script.indexed', 'on' + systemProperty 'es.script.inline', 'true' + systemProperty 'es.script.indexed', 'true' } } diff --git a/plugins/lang-python/build.gradle b/plugins/lang-python/build.gradle index dde9a63bad1..c541b2a3ed3 100644 --- a/plugins/lang-python/build.gradle +++ b/plugins/lang-python/build.gradle @@ -28,8 +28,8 @@ dependencies { integTest { cluster { - systemProperty 'es.script.inline', 'on' - systemProperty 'es.script.indexed', 'on' + systemProperty 'es.script.inline', 'true' + systemProperty 'es.script.indexed', 'true' } } diff --git a/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java index ca11fa242d5..6158345a1b4 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java @@ -1682,8 +1682,8 @@ public abstract class ESIntegTestCase extends ESTestCase { // from failing on nodes without enough disk space .put(DiskThresholdDecider.CLUSTER_ROUTING_ALLOCATION_LOW_DISK_WATERMARK_SETTING.getKey(), "1b") .put(DiskThresholdDecider.CLUSTER_ROUTING_ALLOCATION_HIGH_DISK_WATERMARK_SETTING.getKey(), "1b") - .put("script.indexed", "on") - .put("script.inline", "on") + .put("script.indexed", "true") + .put("script.inline", "true") // wait short time for other active shards before actually deleting, default 30s not needed in tests .put(IndicesStore.INDICES_STORE_DELETE_SHARD_TIMEOUT.getKey(), new TimeValue(1, TimeUnit.SECONDS)); return builder.build(); diff --git a/test/framework/src/main/java/org/elasticsearch/test/ESSingleNodeTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/ESSingleNodeTestCase.java index 783d0b139e6..8b495d35cc6 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/ESSingleNodeTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/ESSingleNodeTestCase.java @@ -166,8 +166,8 @@ public abstract class ESSingleNodeTestCase extends ESTestCase { .put("node.name", nodeName()) .put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1) .put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 0) - .put("script.inline", "on") - .put("script.indexed", "on") + .put("script.inline", "true") + .put("script.indexed", "true") .put(EsExecutors.PROCESSORS_SETTING.getKey(), 1) // limit the number of threads created .put("http.enabled", false) .put(Node.NODE_LOCAL_SETTING.getKey(), true)