Skip to content

Commit

Permalink
Test: Fix expected error message
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnvg committed Oct 22, 2014
1 parent a7dfd74 commit 7214a77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public void testFailure() throws Exception {
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));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1433,7 +1433,7 @@ public void testDeleteByQuery_has_child() throws Exception {
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")
Expand Down Expand Up @@ -1478,7 +1478,7 @@ public void testDeleteByQuery_has_child_SingleRefresh() throws Exception {
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")
Expand Down Expand Up @@ -1531,7 +1531,7 @@ public void testDeleteByQuery_has_parent() throws Exception {
.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();
Expand Down

0 comments on commit 7214a77

Please sign in to comment.