Skip to content

Commit ed4cc8b

Browse files
Disable autoscaling capacity test on debian 8
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 eddab39 commit ed4cc8b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

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

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

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

9+
import org.apache.lucene.util.Constants;
910
import org.elasticsearch.env.NodeEnvironment;
1011
import org.elasticsearch.monitor.os.OsProbe;
1112
import org.elasticsearch.test.ESIntegTestCase;
@@ -14,17 +15,24 @@
1415
import org.hamcrest.Matchers;
1516

1617
import java.util.Set;
18+
import java.util.StringTokenizer;
1719
import java.util.TreeMap;
1820
import java.util.TreeSet;
1921

22+
import static org.apache.lucene.util.Constants.JVM_SPEC_VERSION;
2023
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
2124
import static org.hamcrest.Matchers.greaterThan;
2225

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+
boolean looksLikeDebian8 = Constants.LINUX && Constants.OS_VERSION.startsWith("3.16.0");
31+
final StringTokenizer st = new StringTokenizer(JVM_SPEC_VERSION, ".");
32+
int major = Integer.parseInt(st.nextToken());
33+
// see: https://github.com/elastic/elasticsearch/issues/67089#issuecomment-756114654
34+
assumeTrue("cannot run on debian 8 prior to java 15", major >= 15 || looksLikeDebian8 == false);
35+
2836
assertThat(capacity().results().keySet(), Matchers.empty());
2937
long memory = OsProbe.getInstance().getTotalPhysicalMemorySize();
3038
long storage = internalCluster().getInstance(NodeEnvironment.class).nodePaths()[0].fileStore.getTotalSpace();

0 commit comments

Comments
 (0)