diff options
Diffstat (limited to 'core/src/test/java/org/elasticsearch/search/aggregations/pipeline')
-rw-r--r-- | core/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketScriptIT.java | 3 | ||||
-rw-r--r-- | core/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketSelectorIT.java | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketScriptIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketScriptIT.java index e236845329..5b8ea2d5c6 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketScriptIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketScriptIT.java @@ -23,6 +23,7 @@ import org.elasticsearch.action.index.IndexRequestBuilder; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.xcontent.XContentBuilder; +import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.script.MockScriptPlugin; import org.elasticsearch.script.Script; @@ -482,7 +483,7 @@ public class BucketScriptIT extends ESIntegTestCase { .setId("my_script") .setLang(CustomScriptPlugin.NAME) // Script source is not interpreted but it references a pre-defined script from CustomScriptPlugin - .setContent(new BytesArray("{ \"script\": \"my_script\" }"))); + .setContent(new BytesArray("{ \"script\": \"my_script\" }"), XContentType.JSON)); SearchResponse response = client() .prepareSearch("idx") diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketSelectorIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketSelectorIT.java index 689eafdf5a..68904c94ca 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketSelectorIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketSelectorIT.java @@ -23,6 +23,7 @@ import org.elasticsearch.action.index.IndexRequestBuilder; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.xcontent.XContentBuilder; +import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.script.MockScriptPlugin; import org.elasticsearch.script.Script; @@ -434,7 +435,8 @@ public class BucketSelectorIT extends ESIntegTestCase { .setId("my_script") .setLang(CustomScriptPlugin.NAME) // Source is not interpreted but my_script is defined in CustomScriptPlugin - .setContent(new BytesArray("{ \"script\": \"Double.isNaN(_value0) ? false : (_value0 + _value1 > 100)\" }"))); + .setContent(new BytesArray("{ \"script\": \"Double.isNaN(_value0) ? false : (_value0 + _value1 > 100)\" }"), + XContentType.JSON)); Script script = new Script(ScriptType.STORED, CustomScriptPlugin.NAME, "my_script", Collections.emptyMap()); |