changeset 50972:51e49f77f7eb

8205928: [TESTBUG] jdk/internal/platform/docker/TestDockerMemoryMetrics Reviewed-by: stuefe
author bobv
date Tue, 03 Jul 2018 10:59:18 -0400
parents 14708e1acdc3
children 833a291460b7
files test/jdk/jdk/internal/platform/docker/MetricsMemoryTester.java
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/test/jdk/jdk/internal/platform/docker/MetricsMemoryTester.java	Tue Jul 03 09:27:41 2018 +0800
+++ b/test/jdk/jdk/internal/platform/docker/MetricsMemoryTester.java	Tue Jul 03 10:59:18 2018 -0400
@@ -95,10 +95,11 @@
 
     private static void testKernelMemoryLimit(String value) {
         long limit = getMemoryValue(value);
-        if (limit != Metrics.systemMetrics().getKernelMemoryLimit()) {
+        long kmemlimit = Metrics.systemMetrics().getKernelMemoryLimit();
+        if (kmemlimit != 0 && limit != kmemlimit) {
             throw new RuntimeException("Kernel Memory limit not equal, expected : ["
                     + limit + "]" + ", got : ["
-                    + Metrics.systemMetrics().getKernelMemoryLimit() + "]");
+                    + kmemlimit + "]");
         }
         System.out.println("TEST PASSED!!!");
     }