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
This commit is contained in:
parent
ae47c025e2
commit
54e684bedd
|
@ -21,7 +21,7 @@ public abstract class AbstractHlrcXContentTestCase<T extends ToXContent, H> exte
|
||||||
AbstractXContentTestCase.testFromXContent(NUMBER_OF_TEST_RUNS, this::createTestInstance, supportsUnknownFields(),
|
AbstractXContentTestCase.testFromXContent(NUMBER_OF_TEST_RUNS, this::createTestInstance, supportsUnknownFields(),
|
||||||
getShuffleFieldsExceptions(), getRandomFieldsExcludeFilter(), this::createParser,
|
getShuffleFieldsExceptions(), getRandomFieldsExcludeFilter(), this::createParser,
|
||||||
p -> convertHlrcToInternal(doHlrcParseInstance(p)),
|
p -> convertHlrcToInternal(doHlrcParseInstance(p)),
|
||||||
this::assertEqualInstances, true, getToXContentParams());
|
this::assertEqualInstances, assertToXContentEquivalence(), getToXContentParams());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue