Fix search template request
A seed was hit in that caused mutateInstance to generate an identical
instance. This change prevents that.
@@ -63,8 +63,8 @@ public class SearchTemplateRequestTests extends AbstractStreamableTestCase<Searc
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);
