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:
Zachary Tong 2019-02-05 12:59:05 -05:00 committed by GitHub
parent ae47c025e2
commit 54e684bedd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ public abstract class AbstractHlrcXContentTestCase<T extends ToXContent, H> 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());
}
/**