Skip to content

Commit

Permalink
Fix max_bucket test by disallowing partial results (elastic#41959)
Browse files Browse the repository at this point in the history
The Max Bucket test can potentially return a partial response,
where one of the shards suceeds but another fails due to the max_bucket
setting.  In the case of a partial failure, the status code is 200 OK
since some results were returned (with failures listed in the body).

This makes the yaml test fail since it is expecting a 4xx/5xx failure
when catching exception messages.

We need to disallow partial results so that the entire query fails
and we can check for the max_bucket failure.
  • Loading branch information
polyfractal authored and Gurkan Kaymak committed May 27, 2019
1 parent 8e647f3 commit 3aab2c9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ setup:

---
"Max bucket":
- skip:
version: "all"
reason: "AwaitsFix: https://github.com/elastic/elasticsearch/issues/41947"

- do:
cluster.put_settings:
body:
Expand All @@ -88,6 +86,7 @@ setup:
catch: /.*Trying to create too many buckets.*/
search:
rest_total_hits_as_int: true
allow_partial_search_results: false
index: test
body:
aggregations:
Expand All @@ -105,6 +104,7 @@ setup:
catch: /.*Trying to create too many buckets.*/
search:
rest_total_hits_as_int: true
allow_partial_search_results: false
index: test
body:
aggregations:
Expand Down

0 comments on commit 3aab2c9

Please sign in to comment.