< prev index next >

test/jdk/jdk/internal/platform/docker/MetricsCpuTester.java

Print this page
@  rev 58200 : 8240189: [TESTBUG] Some cgroup tests are failing after JDK-8231111
|  Reviewed-by: mbaesken
~

@@ -22,10 +22,11 @@
  */
 
 import java.util.Arrays;
 import java.util.stream.IntStream;
 import java.util.stream.Stream;
+
 import jdk.internal.platform.Metrics;
 
 public class MetricsCpuTester {
     public static void main(String[] args) {
         System.out.println(Arrays.toString(args));

@@ -94,11 +95,11 @@
             throw new RuntimeException("Cpusets not equal, expected : "
                     + Arrays.toString(ipCpuSet) + ", got : " + Arrays.toString(cpuSets));
         }
 
         // Check to see if this metric is supported on this platform
-        if (effectiveCpus.length != 0) {
+        if (effectiveCpus != null) {
             if (!Arrays.equals(ipCpuSet, effectiveCpus)) {
                 throw new RuntimeException("Effective Cpusets not equal, expected : "
                         + Arrays.toString(ipCpuSet) + ", got : "
                         + Arrays.toString(effectiveCpus));
             }

@@ -129,11 +130,11 @@
                     + Arrays.toString(ipCpuSet) + ", got : "
                     + Arrays.toString(cpuSets));
         }
 
         // Check to see if this metric is supported on this platform
-        if (effectiveMems.length != 0) {
+        if (effectiveMems != null) {
             if (!Arrays.equals(ipCpuSet, effectiveMems)) {
                 throw new RuntimeException("Effective mem nodes not equal, expected : "
                         + Arrays.toString(ipCpuSet) + ", got : "
                         + Arrays.toString(effectiveMems));
             }
< prev index next >