Skip to content

Commit b2d05e3

Browse files
authored
Reinstate support for GET _cluster/stats?timeout=... (#113852) (#113878)
Relates #112478
1 parent 2cfe3f3 commit b2d05e3

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/cluster.stats/10_basic.yml

+13
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,19 @@
3030
- is_true: nodes.plugins
3131
- is_true: nodes.network_types
3232

33+
---
34+
"cluster stats accepts timeout param":
35+
- skip:
36+
cluster_features: "gte_v8.16.0"
37+
reason: "Suppress this test for merging & backporting https://github.com/elastic/elasticsearch/pull/113852"
38+
39+
- do:
40+
cluster.stats:
41+
timeout: 24h
42+
43+
- is_true: timestamp
44+
- is_true: cluster_name
45+
3346
---
3447
"cluster stats with human flag returns docs as human readable size":
3548
- requires:

server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClusterStatsAction.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import java.util.Set;
2626

2727
import static org.elasticsearch.rest.RestRequest.Method.GET;
28+
import static org.elasticsearch.rest.RestUtils.REST_TIMEOUT_PARAM;
2829
import static org.elasticsearch.rest.RestUtils.getTimeout;
2930

3031
@ServerlessScope(Scope.INTERNAL)
@@ -46,7 +47,7 @@ public String getName() {
4647

4748
@Override
4849
public Set<String> supportedQueryParameters() {
49-
return Set.of("include_remotes", "nodeId");
50+
return Set.of("include_remotes", "nodeId", REST_TIMEOUT_PARAM);
5051
}
5152

5253
@Override

0 commit comments

Comments
 (0)