From 54e684bedde2d863247ffe68a536e525fb706ee7 Mon Sep 17 00:00:00 2001 From: Zachary Tong Date: Tue, 5 Feb 2019 12:59:05 -0500 Subject: [PATCH] testHlrcFromXContent() should respect assertToXContentEquivalence() (#38232) 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 d6d8f9afe36..dfe81ab79ce 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 abstract class AbstractHlrcXContentTestCase exte 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()); } /**