[TEST] Fix issue parsing response out of order

When parsing GetResponse it was possible that the equality check failed because
items in the map were in a different order (in the `.equals` implementation).
This commit is contained in:
Lee Hinman 2018-03-14 16:34:40 -06:00
parent ae912cbde4
commit 8425257593
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ public class GetResponseTests extends ESTestCase {
parsedGetResponse = GetResponse.fromXContent(parser);
assertNull(parser.nextToken());
}
assertEquals(expectedGetResponse, parsedGetResponse);
assertEquals(expectedGetResponse.getSourceAsMap(), parsedGetResponse.getSourceAsMap());
//print the parsed object out and test that the output is the same as the original output
BytesReference finalBytes = toXContent(parsedGetResponse, xContentType, humanReadable);
assertToXContentEquivalent(originalBytes, finalBytes, xContentType);