Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase coverage in SearchSortValuesTests #36597

Merged
merged 1 commit into from
Dec 14, 2018

Commits on Dec 14, 2018

  1. Increase coverage in SearchSortValuesTests

    SearchSortValuesTests extends now AbstractSerializingTestCase which removes some code duplication and standardizes the way we test fromXContent, serialization and equals/hashcode.
    
    Also, we were never creating SearchSortValues through their public constructor that accept an array of DocValueFormat together with the array of raw sort values. That is covered now, which involved some conversion from BytesRef to String in the test.
    
    Also, the previos test was not using doing any equality check against the original and parsed versions in testFromXContent due to values being parsed with different types in some cases, which is now covered by converting those values using a new method added to RandomObjects. The code was already there as part of randomStoredFieldValues, but it is now exposed to be used in other scenarios.
    javanna committed Dec 14, 2018
    Configuration menu
    Copy the full SHA
    f3b9926 View commit details
    Browse the repository at this point in the history