--- old/test/jtreg-ext/requires/VMProps.java 2019-07-19 14:13:18.369377580 +0200 +++ new/test/jtreg-ext/requires/VMProps.java 2019-07-19 14:13:17.686376125 +0200 @@ -455,7 +455,7 @@ } private boolean checkDockerSupport() throws IOException, InterruptedException { - ProcessBuilder pb = new ProcessBuilder(Platform.DOCKER_COMMAND, "ps"); + ProcessBuilder pb = new ProcessBuilder(Platform.Docker.DOCKER_COMMAND, "ps"); Process p = pb.start(); p.waitFor(10, TimeUnit.SECONDS); --- old/test/lib/jdk/test/lib/Platform.java 2019-07-19 14:13:20.246381579 +0200 +++ new/test/lib/jdk/test/lib/Platform.java 2019-07-19 14:13:19.584380169 +0200 @@ -33,12 +33,15 @@ import java.security.PrivilegedExceptionAction; public class Platform { - // Use this property to specify docker location on your system. - // E.g.: "/usr/local/bin/docker". We define this constant here so - // that it can be used in VMProps as well which checks docker support - // via this command - public static final String DOCKER_COMMAND = - System.getProperty("jdk.test.docker.command", "docker"); + + public static class Docker { + // Use this property to specify docker location on your system. + // E.g.: "/usr/local/bin/docker". We define this constant here so + // that it can be used in VMProps as well which checks docker support + // via this command + public static final String DOCKER_COMMAND = + System.getProperty("jdk.test.docker.command", "docker"); + } public static final String vmName = privilegedGetProperty("java.vm.name"); public static final String vmInfo = privilegedGetProperty("java.vm.info"); private static final String osVersion = privilegedGetProperty("os.version"); --- old/test/lib/jdk/test/lib/containers/docker/DockerTestUtils.java 2019-07-19 14:13:22.133385599 +0200 +++ new/test/lib/jdk/test/lib/containers/docker/DockerTestUtils.java 2019-07-19 14:13:21.450384144 +0200 @@ -112,7 +112,7 @@ */ private static boolean isDockerEngineAvailableCheck() throws Exception { try { - execute(Platform.DOCKER_COMMAND, "ps") + execute(Platform.Docker.DOCKER_COMMAND, "ps") .shouldHaveExitValue(0) .shouldContain("CONTAINER") .shouldContain("IMAGE"); @@ -175,7 +175,7 @@ DockerfileConfig.getBaseImageVersion()); try { // Build the docker - execute(Platform.DOCKER_COMMAND, "build", "--no-cache", "--tag", imageName, buildDir.toString()) + execute(Platform.Docker.DOCKER_COMMAND, "build", "--no-cache", "--tag", imageName, buildDir.toString()) .shouldHaveExitValue(0); } catch (Exception e) { // If docker image building fails there is a good chance it happens due to environment and/or @@ -197,7 +197,7 @@ public static List buildJavaCommand(DockerRunOptions opts) throws Exception { List cmd = new ArrayList<>(); - cmd.add(Platform.DOCKER_COMMAND); + cmd.add(Platform.Docker.DOCKER_COMMAND); cmd.add("run"); if (opts.tty) cmd.add("--tty=true"); @@ -239,7 +239,7 @@ * @throws Exception */ public static void removeDockerImage(String imageNameAndTag) throws Exception { - execute(Platform.DOCKER_COMMAND, "rmi", "--force", imageNameAndTag); + execute(Platform.Docker.DOCKER_COMMAND, "rmi", "--force", imageNameAndTag); }