< prev index next >

test/lib/jdk/test/lib/containers/docker/DockerTestUtils.java

Print this page
@  rev 55753 : 8228434: jdk/net/Sockets/Test.java fails after JDK-8227642
|  Reviewed-by: duke
~

@@ -110,11 +110,11 @@
      * @return true if docker engine is available and usable
      * @throws Exception
      */
     private static boolean isDockerEngineAvailableCheck() throws Exception {
         try {
-            execute(Platform.DOCKER_COMMAND, "ps")
+            execute(Platform.Docker.DOCKER_COMMAND, "ps")
                 .shouldHaveExitValue(0)
                 .shouldContain("CONTAINER")
                 .shouldContain("IMAGE");
         } catch (Exception e) {
             return false;

@@ -173,11 +173,11 @@
         generateDockerFile(buildDir.resolve("Dockerfile"),
                            DockerfileConfig.getBaseImageName(),
                            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
             // configuration other than product failure. Throw jtreg skipped exception in such case
             // instead of failing the test.

@@ -195,11 +195,11 @@
      * @throws Exception
      */
     public static List<String> buildJavaCommand(DockerRunOptions opts) throws Exception {
         List<String> cmd = new ArrayList<>();
 
-        cmd.add(Platform.DOCKER_COMMAND);
+        cmd.add(Platform.Docker.DOCKER_COMMAND);
         cmd.add("run");
         if (opts.tty)
             cmd.add("--tty=true");
         if (opts.removeContainerAfterUse)
             cmd.add("--rm");

@@ -237,11 +237,11 @@
      *
      * @param DockerRunOptions optins for running docker
      * @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);
     }
 
 
 
     /**
< prev index next >