File tree 1 file changed +6
-3
lines changed
x-pack/plugin/autoscaling/src/internalClusterTest/java/org/elasticsearch/xpack/autoscaling/action 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 6
6
7
7
package org .elasticsearch .xpack .autoscaling .action ;
8
8
9
- import org .apache . lucene . util . Constants ;
9
+ import org .elasticsearch . action . admin . cluster . node . info . NodesInfoResponse ;
10
10
import org .elasticsearch .bootstrap .JavaVersion ;
11
11
import org .elasticsearch .env .NodeEnvironment ;
12
+ import org .elasticsearch .monitor .os .OsInfo ;
12
13
import org .elasticsearch .monitor .os .OsProbe ;
13
14
import org .elasticsearch .test .ESIntegTestCase ;
14
15
import org .elasticsearch .xpack .autoscaling .AutoscalingIntegTestCase ;
26
27
public class TransportGetAutoscalingCapacityActionIT extends AutoscalingIntegTestCase {
27
28
28
29
public void testCurrentCapacity () throws Exception {
29
- boolean looksLikeDebian8 = Constants .LINUX && Constants .OS_VERSION .startsWith ("3.16.0" );
30
+ final NodesInfoResponse response = client ().admin ().cluster ().prepareNodesInfo ().execute ().actionGet ();
31
+ final boolean anyDebian8Nodes =
32
+ response .getNodes ().stream ().anyMatch (ni -> ni .getInfo (OsInfo .class ).getPrettyName ().equals ("Debian GNU/Linux 8 (jessie)" ));
30
33
boolean java15Plus = JavaVersion .current ().compareTo (JavaVersion .parse ("15" )) >= 0 ;
31
34
// see: https://github.com/elastic/elasticsearch/issues/67089#issuecomment-756114654
32
- assumeTrue ("cannot run on debian 8 prior to java 15" , java15Plus || looksLikeDebian8 == false );
35
+ assumeTrue ("cannot run on debian 8 prior to java 15" , java15Plus || anyDebian8Nodes == false );
33
36
34
37
assertThat (capacity ().results ().keySet (), Matchers .empty ());
35
38
long memory = OsProbe .getInstance ().getTotalPhysicalMemorySize ();
You can’t perform that action at this time.
0 commit comments