Skip to content

Commit 54e684b

Browse files
authored
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
1 parent ae47c02 commit 54e684b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

x-pack/plugin/core/src/test/java/org/elasticsearch/protocol/AbstractHlrcXContentTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public final void testHlrcFromXContent() throws IOException {
2121
AbstractXContentTestCase.testFromXContent(NUMBER_OF_TEST_RUNS, this::createTestInstance, supportsUnknownFields(),
2222
getShuffleFieldsExceptions(), getRandomFieldsExcludeFilter(), this::createParser,
2323
p -> convertHlrcToInternal(doHlrcParseInstance(p)),
24-
this::assertEqualInstances, true, getToXContentParams());
24+
this::assertEqualInstances, assertToXContentEquivalence(), getToXContentParams());
2525
}
2626

2727
/**

0 commit comments

Comments
 (0)