Skip to content

Commit

Permalink
Fix search template request (#43509)
Browse files Browse the repository at this point in the history
A seed was hit in (#43157) that caused mutateInstance to generate an identical 
instance. This change prevents that.
  • Loading branch information
jdconrad authored and jtibshirani committed Feb 8, 2021
1 parent ed1324c commit 1bbed54
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -64,8 +64,8 @@ protected SearchTemplateRequest mutateInstance(SearchTemplateRequest instance) t
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);
Expand Down

0 comments on commit 1bbed54

Please sign in to comment.