Test: Fix expected error message
This commit is contained in:
parent
319878eb1e
commit
d6f1ff0150
|
@ -123,7 +123,7 @@ public class DeleteByQueryTests extends ElasticsearchIntegrationTest {
|
|||
assertThat(response.getIndices().get("test").getFailedShards(), equalTo(twitter.numPrimaries));
|
||||
assertThat(response.getIndices().get("test").getFailures().length, equalTo(twitter.numPrimaries));
|
||||
for (ShardOperationFailedException failure : response.getIndices().get("test").getFailures()) {
|
||||
assertThat(failure.reason(), containsString("[test] [has_child] unsupported in delete_by_query api"));
|
||||
assertThat(failure.reason(), containsString("[test] [has_child] query and filter unsupported in delete_by_query api"));
|
||||
assertThat(failure.status(), equalTo(RestStatus.BAD_REQUEST));
|
||||
assertThat(failure.shardId(), greaterThan(-1));
|
||||
}
|
||||
|
|
|
@ -1435,7 +1435,7 @@ public class SimpleChildQuerySearchTests extends ElasticsearchIntegrationTest {
|
|||
DeleteByQueryResponse deleteByQueryResponse = client().prepareDeleteByQuery("test").setQuery(randomHasChild("child", "c_field", "blue")).get();
|
||||
assertThat(deleteByQueryResponse.getIndex("test").getSuccessfulShards(), equalTo(0));
|
||||
assertThat(deleteByQueryResponse.getIndex("test").getFailedShards(), equalTo(getNumShards("test").numPrimaries));
|
||||
assertThat(deleteByQueryResponse.getIndex("test").getFailures()[0].reason(), containsString("[has_child] unsupported in delete_by_query api"));
|
||||
assertThat(deleteByQueryResponse.getIndex("test").getFailures()[0].reason(), containsString("[has_child] query and filter unsupported in delete_by_query api"));
|
||||
client().admin().indices().prepareRefresh("test").get();
|
||||
|
||||
searchResponse = client().prepareSearch("test")
|
||||
|
@ -1480,7 +1480,7 @@ public class SimpleChildQuerySearchTests extends ElasticsearchIntegrationTest {
|
|||
DeleteByQueryResponse deleteByQueryResponse = client().prepareDeleteByQuery("test").setQuery(randomHasChild("child", "c_field", "blue")).get();
|
||||
assertThat(deleteByQueryResponse.getIndex("test").getSuccessfulShards(), equalTo(0));
|
||||
assertThat(deleteByQueryResponse.getIndex("test").getFailedShards(), equalTo(getNumShards("test").numPrimaries));
|
||||
assertThat(deleteByQueryResponse.getIndex("test").getFailures()[0].reason(), containsString("[has_child] unsupported in delete_by_query api"));
|
||||
assertThat(deleteByQueryResponse.getIndex("test").getFailures()[0].reason(), containsString("[has_child] query and filter unsupported in delete_by_query api"));
|
||||
client().admin().indices().prepareRefresh("test").get();
|
||||
|
||||
searchResponse = client().prepareSearch("test")
|
||||
|
@ -1533,7 +1533,7 @@ public class SimpleChildQuerySearchTests extends ElasticsearchIntegrationTest {
|
|||
.get();
|
||||
assertThat(deleteByQueryResponse.getIndex("test").getSuccessfulShards(), equalTo(0));
|
||||
assertThat(deleteByQueryResponse.getIndex("test").getFailedShards(), equalTo(getNumShards("test").numPrimaries));
|
||||
assertThat(deleteByQueryResponse.getIndex("test").getFailures()[0].reason(), containsString("[has_parent] unsupported in delete_by_query api"));
|
||||
assertThat(deleteByQueryResponse.getIndex("test").getFailures()[0].reason(), containsString("[has_parent] query and filter unsupported in delete_by_query api"));
|
||||
client().admin().indices().prepareRefresh("test").get();
|
||||
client().admin().indices().prepareRefresh("test").get();
|
||||
client().admin().indices().prepareRefresh("test").get();
|
||||
|
|
Loading…
Reference in New Issue