diff --git a/elasticsearch/qa/messy-test-xpack-with-mustache/src/test/java/org/elasticsearch/messy/tests/SearchInputIT.java b/elasticsearch/qa/messy-test-xpack-with-mustache/src/test/java/org/elasticsearch/messy/tests/SearchInputIT.java index 635c40756dd..bb5a50d38d3 100644 --- a/elasticsearch/qa/messy-test-xpack-with-mustache/src/test/java/org/elasticsearch/messy/tests/SearchInputIT.java +++ b/elasticsearch/qa/messy-test-xpack-with-mustache/src/test/java/org/elasticsearch/messy/tests/SearchInputIT.java @@ -200,7 +200,9 @@ public class SearchInputIT extends ESIntegTestCase { assertNotNull(executedResult.executedRequest()); assertThat(executedResult.status(), is(Input.Result.Status.SUCCESS)); - assertEquals(executedResult.executedRequest().searchType(), request.searchType()); + if (getNumShards("test-search-index").numPrimaries > 1) { + assertEquals(executedResult.executedRequest().searchType(), request.searchType()); + } assertArrayEquals(executedResult.executedRequest().indices(), request.indices()); assertEquals(executedResult.executedRequest().indicesOptions(), request.indicesOptions());