-
Notifications
You must be signed in to change notification settings - Fork 24.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return
408 REQUEST_TIMEOUT
if _cluster/health
times out
Today we return `200 OK` which is misleading since we really didn't produce a valid response / didn't wait long enough.
- Loading branch information
Showing
6 changed files
with
46 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
rest-api-spec/src/main/resources/rest-api-spec/test/cluster.health/20_request_timeout.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
"cluster health request timeout": | ||
- do: | ||
catch: request_timeout | ||
cluster.health: | ||
wait_for_nodes: 10 | ||
timeout: 1s | ||
|
||
- is_true: cluster_name | ||
- is_true: timed_out | ||
- gte: { number_of_nodes: 1 } | ||
- gte: { number_of_data_nodes: 1 } | ||
- match: { active_primary_shards: 0 } | ||
- match: { active_shards: 0 } | ||
- match: { relocating_shards: 0 } | ||
- match: { initializing_shards: 0 } | ||
- match: { unassigned_shards: 0 } | ||
- gte: { number_of_pending_tasks: 0 } |