Skip to content

Commit c124f1b

Browse files
Skip HealthNodeUpgradeIT for some rolling upgrades (#119698)
* Skip HealthNodeUpgradeIT for some rolling upgrades This skips part of the `HealthNodeUpgradeIT` test for the rolling upgrade tests which use a cluster with a mix of 8.5.x and 8.6.x nodes, which serve the health endpoint at `_internal/_health`, and 8.last nodes, which serve it at `_health_report`. There is no sensible and reliable way to test the endpoint in such clusters. Closes #118157 Closes #118158
1 parent 7f3ab2c commit c124f1b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

muted-tests.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -378,12 +378,6 @@ tests:
378378
- class: org.elasticsearch.xpack.esql.action.EsqlActionTaskIT
379379
method: testCancelRequestWhenFailingFetchingPages
380380
issue: https://github.com/elastic/elasticsearch/issues/118213
381-
- class: org.elasticsearch.upgrades.HealthNodeUpgradeIT
382-
method: testHealthNode {upgradedNodes=1}
383-
issue: https://github.com/elastic/elasticsearch/issues/118157
384-
- class: org.elasticsearch.upgrades.HealthNodeUpgradeIT
385-
method: testHealthNode {upgradedNodes=2}
386-
issue: https://github.com/elastic/elasticsearch/issues/118158
387381
- class: org.elasticsearch.xpack.inference.DefaultEndPointsIT
388382
method: testInferDeploysDefaultRerank
389383
issue: https://github.com/elastic/elasticsearch/issues/118184

qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/HealthNodeUpgradeIT.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,21 @@ public HealthNodeUpgradeIT(@Name("upgradedNodes") int upgradedNodes) {
2828
}
2929

3030
public void testHealthNode() throws Exception {
31+
// Assert that the response from _cat/tasks returns health-node provided the health.supports_health feature is present
3132
if (clusterHasFeature("health.supports_health")) {
3233
assertBusy(() -> {
3334
Response response = client().performRequest(new Request("GET", "_cat/tasks"));
3435
String tasks = EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8);
3536
assertThat(tasks, Matchers.containsString("health-node"));
3637
});
38+
}
39+
40+
// Assert that _health_report endpoint returns a green status provided the health.supports_health_report_api feature is present
41+
// N.B. If this feature is not present, the cluster may have a mixture of nodes which serve the health endpoint at /_health_report
42+
// and older nodes which serve it at /_internal/_health. There is no sensible and reliable way to test the endpoint in this case.
43+
if (clusterHasFeature("health.supports_health_report_api")) {
3744
assertBusy(() -> {
38-
String path = clusterHasFeature("health.supports_health_report_api") ? "_health_report" : "_internal/_health";
39-
Response response = client().performRequest(new Request("GET", path));
45+
Response response = client().performRequest(new Request("GET", "_health_report"));
4046
Map<String, Object> health_report = entityAsMap(response.getEntity());
4147
assertThat(health_report.get("status"), equalTo("green"));
4248
});

0 commit comments

Comments
 (0)