Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix rare serialization failure in SuggestTests (elastic#101014)
SuggestTests uses a fairly recursive way to create its test item. Those can end up with an CompletionSuggestion.Entry.Option that have a "rank" field set to something other than the bwc default of -1. The test still tries to test the serialization roundtrip to a random transport version down to TransportVersions.MINIMUM_COMPATIBLE which is currently at V_7_17_0, but the rank field serialization fails for anything below V_8_8_0. In reality however, suggester options shouldn't contain search hits with a set rank field, so simples way to avoid it is checking the randomly created test item for those cases and correct them before running the test. Closes elastic#95607
- Loading branch information