test/jdk/tools/jpackage/windows/WinConsoleTest.java
branchJDK-8200758-branch
changeset 58301 e0efb29609bd
parent 58113 885b0543f6e4
child 58416 f09bf58c1f17
--- a/test/jdk/tools/jpackage/windows/WinConsoleTest.java	Mon Sep 16 19:24:32 2019 -0400
+++ b/test/jdk/tools/jpackage/windows/WinConsoleTest.java	Tue Sep 24 13:41:16 2019 -0400
@@ -37,24 +37,26 @@
  * @library ../helpers
  * @requires (os.family == "windows")
  * @modules jdk.jpackage/jdk.jpackage.internal
- * @run main/othervm -Xmx512m WinConsoleTest
+ * @run main/othervm/timeout=360 -Xmx512m WinConsoleTest
  */
 public class WinConsoleTest {
 
-    public static void main(String[] args) throws IOException {
-        JPackageCommand cmd = JPackageCommand.helloAppImage();
-        final Path launcherPath = cmd.appImage().resolve(
-                cmd.launcherPathInAppImage());
+    public static void main(String[] args) {
+        Test.run(args, () -> {
+            JPackageCommand cmd = JPackageCommand.helloAppImage();
+            final Path launcherPath = cmd.appImage().resolve(
+                    cmd.launcherPathInAppImage());
 
-        IOUtils.deleteRecursive(cmd.outputDir().toFile());
-        cmd.execute().assertExitCodeIsZero();
-        HelloApp.executeAndVerifyOutput(launcherPath);
-        checkSubsystem(launcherPath, false);
+            IOUtils.deleteRecursive(cmd.outputDir().toFile());
+            cmd.execute().assertExitCodeIsZero();
+            HelloApp.executeLauncherAndVerifyOutput(cmd);
+            checkSubsystem(launcherPath, false);
 
-        IOUtils.deleteRecursive(cmd.outputDir().toFile());
-        cmd.addArgument("--win-console").execute().assertExitCodeIsZero();
-        HelloApp.executeAndVerifyOutput(launcherPath);
-        checkSubsystem(launcherPath, true);
+            IOUtils.deleteRecursive(cmd.outputDir().toFile());
+            cmd.addArgument("--win-console").execute().assertExitCodeIsZero();
+            HelloApp.executeLauncherAndVerifyOutput(cmd);
+            checkSubsystem(launcherPath, true);
+        });
     }
 
     private static void checkSubsystem(Path path, boolean isConsole) throws