diff --git a/test/lib/jdk/test/lib/containers/docker/DockerTestUtils.java b/test/lib/jdk/test/lib/containers/docker/DockerTestUtils.java index dc3baaeefe7..ff92a2293f5 100644 --- a/test/lib/jdk/test/lib/containers/docker/DockerTestUtils.java +++ b/test/lib/jdk/test/lib/containers/docker/DockerTestUtils.java @@ -42,6 +42,7 @@ import jdk.test.lib.Utils; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; +import jtreg.SkippedException; public class DockerTestUtils { @@ -90,9 +91,7 @@ public static boolean canTestDocker() throws Exception { if (isDockerEngineAvailable()) { return true; } else { - System.out.println("Docker engine is not available on this system"); - System.out.println("This test is SKIPPED"); - return false; + throw new SkippedException("Docker engine is not available on this system"); } }