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 committed May 9, 2019
1 parent b8e622d commit 7049882
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,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 @@ -106,6 +107,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 7049882

Please sign in to comment.