Skip to content

Commit

Permalink
Fix GetFieldMappingsResponseTests (#82147) (#82149)
Browse files Browse the repository at this point in the history
The new `testConcurrentToXContent` wasn't respecting the built in
`getToXContentParams` used to customize how we render in tests.
  • Loading branch information
nik9000 committed Dec 30, 2021
1 parent 11fc718 commit 2781adf
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ public final void testFromXContent() throws IOException {
public final void testConcurrentToXContent() throws IOException, InterruptedException, ExecutionException {
XContentType xContentType = randomFrom(XContentType.values());
T testInstance = createXContextTestInstance(xContentType);
ToXContent.Params params = new ToXContent.MapParams(singletonMap(RestSearchAction.TYPED_KEYS_PARAM, "true"));
ToXContent.Params params = new ToXContent.DelegatingMapParams(
singletonMap(RestSearchAction.TYPED_KEYS_PARAM, "true"),
getToXContentParams()
);
boolean humanReadable = randomBoolean();
BytesRef firstTimeBytes = toXContent(testInstance, xContentType, params, humanReadable).toBytesRef();

Expand Down

0 comments on commit 2781adf

Please sign in to comment.