Fix search template request (#43509)

A seed was hit in (#43157) that caused mutateInstance to generate an identical
instance. This change prevents that.

Signed-off-by: Peter Nied <petern@amazon.com>
This commit is contained in:
Jack Conradson 2019-06-25 07:27:56 -07:00 committed by Peter Nied
parent a37fc3be68
commit 3efee2e2ad
1 changed files with 2 additions and 2 deletions

View File

@ -64,8 +64,8 @@ public class SearchTemplateRequestTests extends AbstractWireSerializingTestCase<
mutators.add(request -> request.setExplain(!request.isExplain()));
mutators.add(request -> request.setSimulate(!request.isSimulate()));
mutators.add(request -> request.setRequest(
RandomSearchRequestGenerator.randomSearchRequest(SearchSourceBuilder::searchSource)));
mutators.add(request -> request.setRequest(randomValueOtherThan(request.getRequest(),
() -> RandomSearchRequestGenerator.randomSearchRequest(SearchSourceBuilder::searchSource))));
SearchTemplateRequest mutatedInstance = copyInstance(instance);
Consumer<SearchTemplateRequest> mutator = randomFrom(mutators);