From b2b95cb25de109efe3f0151577d262ea2e1ed597 Mon Sep 17 00:00:00 2001 From: Lee Hinman Date: Mon, 5 Feb 2018 16:51:12 -0700 Subject: [PATCH] [TEST] Fix compilation for XContent parser Original commit: elastic/x-pack-elasticsearch@bf03cc34fe64e85e429d3361a926e227b35b2d17 --- .../xpack/ml/integration/MlDistributedFailureIT.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/MlDistributedFailureIT.java b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/MlDistributedFailureIT.java index 6e777c174a2..f372bff5c7d 100644 --- a/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/MlDistributedFailureIT.java +++ b/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/MlDistributedFailureIT.java @@ -12,6 +12,7 @@ import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.common.CheckedRunnable; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.settings.Settings; +import org.elasticsearch.common.xcontent.DeprecationHandler; import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.elasticsearch.common.xcontent.XContentHelper; import org.elasticsearch.common.xcontent.XContentParser; @@ -247,7 +248,8 @@ public class MlDistributedFailureIT extends BaseMlIntegTestCase { } BytesReference source = searchResponse.getHits().getHits()[0].getSourceRef(); - try (XContentParser parser = XContentHelper.createParser(NamedXContentRegistry.EMPTY, source, XContentType.JSON)) { + try (XContentParser parser = XContentHelper.createParser(NamedXContentRegistry.EMPTY, + DeprecationHandler.THROW_UNSUPPORTED_OPERATION, source, XContentType.JSON)) { return DataCounts.PARSER.apply(parser, null); } catch (IOException e) { throw new RuntimeException(e);