test/runtime/containers/docker/TestCPUAwareness.java

changeset 9657
71aba4a921a0
parent 9421
6cfec782c42c
child 9992
1d9ed8dec94c
     1.1 --- a/test/runtime/containers/docker/TestCPUAwareness.java	Tue Mar 19 17:30:58 2019 +0100
     1.2 +++ b/test/runtime/containers/docker/TestCPUAwareness.java	Thu Jan 31 23:56:37 2019 +0800
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -125,7 +125,8 @@
    1.11      private static void testCpus(int valueToSet, int expectedTraceValue) throws Exception {
    1.12          Common.logNewTestCase("test cpus: " + valueToSet);
    1.13          DockerRunOptions opts = Common.newOpts(imageName)
    1.14 -            .addDockerOpts("--cpus", "" + valueToSet);
    1.15 +            .addDockerOpts("--cpu-period=" + 10000)
    1.16 +            .addDockerOpts("--cpu-quota=" + valueToSet * 10000);
    1.17          Common.run(opts)
    1.18              .shouldMatch("active_processor_count.*" + expectedTraceValue);
    1.19      }

mercurial