From ea98113e109986021210825ee2c8eac48ca7669b Mon Sep 17 00:00:00 2001 From: Yannick Welsch Date: Mon, 13 Nov 2017 18:33:02 +0100 Subject: [PATCH] Fix compilation errors in IndexGraveyardTests backport gone wrong --- .../elasticsearch/cluster/metadata/IndexGraveyardTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/test/java/org/elasticsearch/cluster/metadata/IndexGraveyardTests.java b/core/src/test/java/org/elasticsearch/cluster/metadata/IndexGraveyardTests.java index ef801dad28eb..54073458a694 100644 --- a/core/src/test/java/org/elasticsearch/cluster/metadata/IndexGraveyardTests.java +++ b/core/src/test/java/org/elasticsearch/cluster/metadata/IndexGraveyardTests.java @@ -19,12 +19,12 @@ package org.elasticsearch.cluster.metadata; -import org.elasticsearch.common.Strings; import org.elasticsearch.common.UUIDs; import org.elasticsearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; +import org.elasticsearch.common.xcontent.XContentHelper; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.index.Index; @@ -70,7 +70,7 @@ public void testXContent() throws IOException { builder.endObject(); if (graveyard.getTombstones().size() > 0) { // check that date properly printed - assertThat(Strings.toString(graveyard, false, true), + assertThat(XContentHelper.toString(graveyard, new ToXContent.MapParams(Collections.singletonMap("human", "true"))), containsString(XContentBuilder.DEFAULT_DATE_PRINTER.print(graveyard.getTombstones().get(0).getDeleteDateInMillis()))); } XContentParser parser = createParser(JsonXContent.jsonXContent, builder.bytes());