[TEST] Added logging and removed unneeded jackson-databind test dependency.

Original commit: elastic/x-pack-elasticsearch@58c247d696
This commit is contained in:
Martijn van Groningen 2017-03-16 21:17:02 +01:00
parent 407cc3a9d7
commit 73c5c1576f
2 changed files with 3 additions and 4 deletions

View File

@ -3,7 +3,6 @@ apply plugin: 'elasticsearch.rest-test'
dependencies {
testCompile project(path: ':x-pack-elasticsearch:plugin', configuration: 'runtime')
testCompile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.8.6'
}
integTestCluster {

View File

@ -5,7 +5,6 @@
*/
package org.elasticsearch.xpack.ml.transforms;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
import org.apache.http.util.EntityUtils;
@ -27,6 +26,7 @@ import java.util.concurrent.TimeUnit;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.hamcrest.Matchers.anyOf;
import static org.hamcrest.Matchers.equalTo;
@ -197,7 +197,6 @@ public class PainlessDomainSplitIT extends ESRestTestCase {
}
public void testIsolated() throws Exception {
Settings.Builder settings = Settings.builder()
.put(IndexMetaData.INDEX_NUMBER_OF_SHARDS_SETTING.getKey(), 1)
.put(IndexMetaData.INDEX_NUMBER_OF_REPLICAS_SETTING.getKey(), 0);
@ -213,7 +212,8 @@ public class PainlessDomainSplitIT extends ESRestTestCase {
params.putAll(DomainSplitFunction.params);
for (TestConfiguration testConfig : tests) {
params.put("host", testConfig.hostName);
String mapAsJson = new ObjectMapper().writeValueAsString(params);
String mapAsJson = jsonBuilder().map(params).string();
logger.info("params={}", mapAsJson);
StringEntity body = new StringEntity("{\n" +
" \"query\" : {\n" +