Skip to content

Commit

Permalink
Fix flaky testEqualsAndHashcode in SearchRequestTests (opensearch-pro…
Browse files Browse the repository at this point in the history
…ject#10649)

Signed-off-by: David Zane <davizane@amazon.com>
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
  • Loading branch information
dzane17 authored and deshsidd committed Oct 18, 2023
1 parent cc17129 commit e9bc0f4
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,9 @@ private SearchRequest mutate(SearchRequest searchRequest) {
);
mutators.add(() -> mutation.source(randomValueOtherThan(searchRequest.source(), this::createSearchSourceBuilder)));
mutators.add(() -> mutation.setCcsMinimizeRoundtrips(searchRequest.isCcsMinimizeRoundtrips() == false));
mutators.add(() -> mutation.setPhaseTook(searchRequest.isPhaseTook() == false));
mutators.add(
() -> mutation.setPhaseTook(searchRequest.isPhaseTook() == null ? randomBoolean() : searchRequest.isPhaseTook() == false)
);
mutators.add(
() -> mutation.setCancelAfterTimeInterval(
searchRequest.getCancelAfterTimeInterval() != null
Expand Down

0 comments on commit e9bc0f4

Please sign in to comment.