Skip to content

Commit

Permalink
testHlrcFromXContent() should respect assertToXContentEquivalence() (#…
Browse files Browse the repository at this point in the history
…38453)

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
Backport of #38232
  • Loading branch information
polyfractal authored Feb 8, 2019
1 parent 8cf12fa commit b4cde4b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public final void testHlrcFromXContent() throws IOException {
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());
}

/**
Expand Down

0 comments on commit b4cde4b

Please sign in to comment.