mirror of
https://github.com/openjdk/jdk.git
synced 2026-06-01 00:02:37 +00:00
8217597: [TESTBUG] old version docker does not support --cpus
"--cpus" is only available in Docker 1.13 and higher, and is the equivalent of setting both --cpu-period and --cpu-quota. Reviewed-by: bobv, dholmes
This commit is contained in:
parent
6c640e1831
commit
fc31592f6e
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -129,7 +129,8 @@ public class TestCPUAwareness {
|
||||
private static void testCpus(int valueToSet, int expectedTraceValue) throws Exception {
|
||||
Common.logNewTestCase("test cpus: " + valueToSet);
|
||||
DockerRunOptions opts = Common.newOpts(imageName)
|
||||
.addDockerOpts("--cpus", "" + valueToSet);
|
||||
.addDockerOpts("--cpu-period=" + 10000)
|
||||
.addDockerOpts("--cpu-quota=" + valueToSet * 10000);
|
||||
Common.run(opts)
|
||||
.shouldMatch("active_processor_count.*" + expectedTraceValue);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user