Skip to content

Commit f1ff35d

Browse files
committed
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 elastic#36034
1 parent 03a1d21 commit f1ff35d

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)