summaryrefslogtreecommitdiff
path: root/core/src/test/java/org/elasticsearch/common
diff options
context:
space:
mode:
authorTanguy Leroux <tlrx.dev@gmail.com>2017-05-18 09:43:57 +0200
committerTanguy Leroux <tlrx.dev@gmail.com>2017-05-18 09:43:57 +0200
commiteeef2e6c31d2f9c1947d28d346b2d7459b8efa08 (patch)
treee63ac983a52807d6100e6fba03a32fb091a374e7 /core/src/test/java/org/elasticsearch/common
parentf10391e16ef39aa583882d52ecdebc58fccb3c0d (diff)
parentec025f825b87c8dbd1b8c8a0af262fff04d707f4 (diff)
Merge remote-tracking branch 'origin/master' into feature/client_aggs_parsing
Diffstat (limited to 'core/src/test/java/org/elasticsearch/common')
-rw-r--r--core/src/test/java/org/elasticsearch/common/lucene/search/function/ScriptScoreFunctionTests.java13
-rw-r--r--core/src/test/java/org/elasticsearch/common/settings/SettingsModuleTests.java19
2 files changed, 1 insertions, 31 deletions
diff --git a/core/src/test/java/org/elasticsearch/common/lucene/search/function/ScriptScoreFunctionTests.java b/core/src/test/java/org/elasticsearch/common/lucene/search/function/ScriptScoreFunctionTests.java
index d7ee7629c9..c375be1a32 100644
--- a/core/src/test/java/org/elasticsearch/common/lucene/search/function/ScriptScoreFunctionTests.java
+++ b/core/src/test/java/org/elasticsearch/common/lucene/search/function/ScriptScoreFunctionTests.java
@@ -20,7 +20,6 @@
package org.elasticsearch.common.lucene.search.function;
import org.apache.lucene.index.LeafReaderContext;
-import org.elasticsearch.script.AbstractDoubleSearchScript;
import org.elasticsearch.script.GeneralScriptException;
import org.elasticsearch.script.LeafSearchScript;
import org.elasticsearch.script.SearchScript;
@@ -37,17 +36,7 @@ public class ScriptScoreFunctionTests extends ESTestCase {
ScoreFunction scoreFunction = new ScriptScoreFunction(mockScript("Double.NaN"), new SearchScript() {
@Override
public LeafSearchScript getLeafSearchScript(LeafReaderContext context) throws IOException {
- return new AbstractDoubleSearchScript() {
- @Override
- public double runAsDouble() {
- return Double.NaN;
- }
-
- @Override
- public void setDocument(int doc) {
- // do nothing: we are a fake with no lookup
- }
- };
+ return () -> Double.NaN;
}
@Override
diff --git a/core/src/test/java/org/elasticsearch/common/settings/SettingsModuleTests.java b/core/src/test/java/org/elasticsearch/common/settings/SettingsModuleTests.java
index 6da023aef2..f2d9016a09 100644
--- a/core/src/test/java/org/elasticsearch/common/settings/SettingsModuleTests.java
+++ b/core/src/test/java/org/elasticsearch/common/settings/SettingsModuleTests.java
@@ -207,23 +207,4 @@ public class SettingsModuleTests extends ModuleTestCase {
assertEquals("unknown setting [index.query.bool.max_clause_count] did you mean [indices.query.bool.max_clause_count]?",
ex.getMessage());
}
-
- public void testRegisterShared() {
- Property scope = randomFrom(Property.NodeScope, Property.IndexScope);
- expectThrows(IllegalArgumentException.class, () ->
- new SettingsModule(Settings.EMPTY,
- Setting.simpleString("index.foo.bar", scope), Setting.simpleString("index.foo.bar", scope))
- );
- expectThrows(IllegalArgumentException.class, () ->
- new SettingsModule(Settings.EMPTY,
- Setting.simpleString("index.foo.bar", scope, Property.Shared), Setting.simpleString("index.foo.bar", scope))
- );
- expectThrows(IllegalArgumentException.class, () ->
- new SettingsModule(Settings.EMPTY,
- Setting.simpleString("index.foo.bar", scope), Setting.simpleString("index.foo.bar", scope, Property.Shared))
- );
- new SettingsModule(Settings.EMPTY,
- Setting.simpleString("index.foo.bar", scope, Property.Shared),
- Setting.simpleString("index.foo.bar", scope, Property.Shared));
- }
}