< prev index next >

test/hotspot/jtreg/runtime/containers/docker/TestCPUAwareness.java

Print this page
rev 53488 : 8217597: [TESTBUG] old version docker does not support --cpus
Summary: "--cpus" is available in Docker 1.13 and higher, and is the equivalent of setting both --cpu-period and --cpu-quota.

*** 127,137 **** private static void testCpus(int valueToSet, int expectedTraceValue) throws Exception { Common.logNewTestCase("test cpus: " + valueToSet); DockerRunOptions opts = Common.newOpts(imageName) ! .addDockerOpts("--cpus", "" + valueToSet); Common.run(opts) .shouldMatch("active_processor_count.*" + expectedTraceValue); } --- 127,138 ---- private static void testCpus(int valueToSet, int expectedTraceValue) throws Exception { Common.logNewTestCase("test cpus: " + valueToSet); DockerRunOptions opts = Common.newOpts(imageName) ! .addDockerOpts("--cpu-period=" + 10000) ! .addDockerOpts("--cpu-quota=" + valueToSet * 10000); Common.run(opts) .shouldMatch("active_processor_count.*" + expectedTraceValue); }
< prev index next >