From d6f1ff0150b8b2bb877868ee616906bcf3fae3e4 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Wed, 22 Oct 2014 10:06:10 +0200 Subject: [PATCH] Test: Fix expected error message --- .../org/elasticsearch/deleteByQuery/DeleteByQueryTests.java | 2 +- .../search/child/SimpleChildQuerySearchTests.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/java/org/elasticsearch/deleteByQuery/DeleteByQueryTests.java b/src/test/java/org/elasticsearch/deleteByQuery/DeleteByQueryTests.java index ba9ae8788f7..66ec621ea6d 100644 --- a/src/test/java/org/elasticsearch/deleteByQuery/DeleteByQueryTests.java +++ b/src/test/java/org/elasticsearch/deleteByQuery/DeleteByQueryTests.java @@ -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)); } diff --git a/src/test/java/org/elasticsearch/search/child/SimpleChildQuerySearchTests.java b/src/test/java/org/elasticsearch/search/child/SimpleChildQuerySearchTests.java index 876635ba5f0..cd7ade8a727 100644 --- a/src/test/java/org/elasticsearch/search/child/SimpleChildQuerySearchTests.java +++ b/src/test/java/org/elasticsearch/search/child/SimpleChildQuerySearchTests.java @@ -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();