Skip to content

Commit

Permalink
Disable autoscaling capacity test on debian 8 (#67159)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
henningandersen committed Jan 8, 2021
1 parent 0d37f0d commit f97d973
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@

package org.elasticsearch.xpack.autoscaling.action;

import org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse;
import org.elasticsearch.bootstrap.JavaVersion;
import org.elasticsearch.env.NodeEnvironment;
import org.elasticsearch.monitor.os.OsInfo;
import org.elasticsearch.monitor.os.OsProbe;
import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.xpack.autoscaling.AutoscalingIntegTestCase;
Expand All @@ -22,8 +25,15 @@
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
public class TransportGetAutoscalingCapacityActionIT extends AutoscalingIntegTestCase {

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/67089")
public void testCurrentCapacity() throws Exception {
final NodesInfoResponse response = client().admin().cluster().prepareNodesInfo().execute().actionGet();
final boolean anyDebian8Nodes = response.getNodes()
.stream()
.anyMatch(ni -> ni.getInfo(OsInfo.class).getPrettyName().equals("Debian GNU/Linux 8 (jessie)"));
boolean java15Plus = JavaVersion.current().compareTo(JavaVersion.parse("15")) >= 0;
// see: https://github.com/elastic/elasticsearch/issues/67089#issuecomment-756114654
assumeTrue("cannot run on debian 8 prior to java 15", java15Plus || anyDebian8Nodes == false);

assertThat(capacity().results().keySet(), Matchers.empty());
long memory = OsProbe.getInstance().getTotalPhysicalMemorySize();
long storage = internalCluster().getInstance(NodeEnvironment.class).nodePaths()[0].fileStore.getTotalSpace();
Expand Down

0 comments on commit f97d973

Please sign in to comment.