--- old/test/jdk/jdk/internal/platform/docker/MetricsCpuTester.java 2019-11-15 17:05:32.864836977 +0100 +++ new/test/jdk/jdk/internal/platform/docker/MetricsCpuTester.java 2019-11-15 17:05:32.737836689 +0100 @@ -143,6 +143,11 @@ private static void testCpuShares(long shares) { Metrics metrics = Metrics.systemMetrics(); + if ("cgroupv2".equals(metrics.getProvider()) && shares < 1024) { + // Adjust input shares for < 1024 cpu shares as the + // impl. rounds up to the next multiple of 1024 + shares = 1024; + } long newShares = metrics.getCpuShares(); if (newShares != shares) { throw new RuntimeException("CPU shares not equal, expected : ["