Skip to content

Commit ad27575

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 140a481 commit ad27575

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;
@@ -23,8 +26,15 @@
2326
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
2427
public class TransportGetAutoscalingCapacityActionIT extends AutoscalingIntegTestCase {
2528

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

0 commit comments

Comments
 (0)