equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
49 try { |
49 try { |
50 Common.logNewTestCase("Test SystemMetrics"); |
50 Common.logNewTestCase("Test SystemMetrics"); |
51 DockerRunOptions opts = |
51 DockerRunOptions opts = |
52 new DockerRunOptions(imageName, "/jdk/bin/java", "jdk.test.lib.containers.cgroup.MetricsTester"); |
52 new DockerRunOptions(imageName, "/jdk/bin/java", "jdk.test.lib.containers.cgroup.MetricsTester"); |
53 opts.addDockerOpts("--volume", Utils.TEST_CLASSES + ":/test-classes/"); |
53 opts.addDockerOpts("--volume", Utils.TEST_CLASSES + ":/test-classes/"); |
|
54 opts.addDockerOpts("--memory=256m"); |
54 opts.addJavaOpts("-cp", "/test-classes/"); |
55 opts.addJavaOpts("-cp", "/test-classes/"); |
55 opts.addJavaOpts("--add-exports", "java.base/jdk.internal.platform=ALL-UNNAMED"); |
56 opts.addJavaOpts("--add-exports", "java.base/jdk.internal.platform=ALL-UNNAMED"); |
56 DockerTestUtils.dockerRunJava(opts).shouldHaveExitValue(0).shouldContain("TEST PASSED!!!"); |
57 DockerTestUtils.dockerRunJava(opts).shouldHaveExitValue(0).shouldContain("TEST PASSED!!!"); |
57 } finally { |
58 } finally { |
58 DockerTestUtils.removeDockerImage(imageName); |
59 DockerTestUtils.removeDockerImage(imageName); |