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 58fdadf commit ecc1500
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -53,8 +53,8 @@ protected SearchTemplateRequest mutateInstance(SearchTemplateRequest instance) t
mutators.add(request -> request.setExplain(request.isExplain() == false));
mutators.add(request -> request.setSimulate(request.isSimulate() == false));

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 ecc1500

Please sign in to comment.