Skip to content

Commit 6e4bc37

Browse files
Disable autoscaling capacity test on debian 8 (#67159)
Prior to java 15, ES running on debian 8 will report 0 memory of host, therefore this test cannot run on debian 8. Relates #67089
1 parent c68da92 commit 6e4bc37

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

x-pack/plugin/autoscaling/src/internalClusterTest/java/org/elasticsearch/xpack/autoscaling/action/TransportGetAutoscalingCapacityActionIT.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66

77
package org.elasticsearch.xpack.autoscaling.action;
88

9+
import org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse;
10+
import org.elasticsearch.bootstrap.JavaVersion;
911
import org.elasticsearch.env.NodeEnvironment;
12+
import org.elasticsearch.monitor.os.OsInfo;
1013
import org.elasticsearch.monitor.os.OsProbe;
1114
import org.elasticsearch.test.ESIntegTestCase;
1215
import org.elasticsearch.xpack.autoscaling.AutoscalingIntegTestCase;
@@ -22,8 +25,15 @@
2225
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
2326
public class TransportGetAutoscalingCapacityActionIT extends AutoscalingIntegTestCase {
2427

25-
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/67089")
2628
public void testCurrentCapacity() throws Exception {
29+
final NodesInfoResponse response = client().admin().cluster().prepareNodesInfo().execute().actionGet();
30+
final boolean anyDebian8Nodes = response.getNodes()
31+
.stream()
32+
.anyMatch(ni -> ni.getInfo(OsInfo.class).getPrettyName().equals("Debian GNU/Linux 8 (jessie)"));
33+
boolean java15Plus = JavaVersion.current().compareTo(JavaVersion.parse("15")) >= 0;
34+
// see: https://github.com/elastic/elasticsearch/issues/67089#issuecomment-756114654
35+
assumeTrue("cannot run on debian 8 prior to java 15", java15Plus || anyDebian8Nodes == false);
36+
2737
assertThat(capacity().results().keySet(), Matchers.empty());
2838
long memory = OsProbe.getInstance().getTotalPhysicalMemorySize();
2939
long storage = internalCluster().getInstance(NodeEnvironment.class).nodePaths()[0].fileStore.getTotalSpace();

0 commit comments

Comments
 (0)