From f1ff35d828bd4ab304ae29ad50f665cd8ba2f8b1 Mon Sep 17 00:00:00 2001 From: Zachary Tong Date: Fri, 1 Feb 2019 16:31:14 -0500 Subject: [PATCH] testHlrcFromXContent() should respect assertToXContentEquivalence() Tests can override assertToXContentEquivalence() in case their xcontent cannot be directly compared (e.g. due to insertion order in maps affecting the xcontent ordering). But the `testHlrcFromXContent` test hardcoded the equivalence test to `true` instead of consulting `assertToXContentEquivalence()` Fixes #36034 --- .../elasticsearch/protocol/AbstractHlrcXContentTestCase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/protocol/AbstractHlrcXContentTestCase.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/protocol/AbstractHlrcXContentTestCase.java index d6d8f9afe3659..dfe81ab79ce45 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/protocol/AbstractHlrcXContentTestCase.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/protocol/AbstractHlrcXContentTestCase.java @@ -21,7 +21,7 @@ public final void testHlrcFromXContent() throws IOException { AbstractXContentTestCase.testFromXContent(NUMBER_OF_TEST_RUNS, this::createTestInstance, supportsUnknownFields(), getShuffleFieldsExceptions(), getRandomFieldsExcludeFilter(), this::createParser, p -> convertHlrcToInternal(doHlrcParseInstance(p)), - this::assertEqualInstances, true, getToXContentParams()); + this::assertEqualInstances, assertToXContentEquivalence(), getToXContentParams()); } /**