8205928: [TESTBUG] jdk/internal/platform/docker/TestDockerMemoryMetrics
Reviewed-by: stuefe
--- 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!!!");
}