From 38517f2d07de66eadf97cf2705c6d3a5d9560d08 Mon Sep 17 00:00:00 2001 From: nik Date: Thu, 20 Aug 2015 17:18:22 +0300 Subject: [PATCH] cucumber tests: invoke System.exit even if exception is thrown to avoid hanging --- .../src/com/intellij/cucumber/CucumberMain.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build/cucumber-test-runner/src/com/intellij/cucumber/CucumberMain.java b/build/cucumber-test-runner/src/com/intellij/cucumber/CucumberMain.java index 04aa4bad456f..40d91c7dfe0c 100644 --- a/build/cucumber-test-runner/src/com/intellij/cucumber/CucumberMain.java +++ b/build/cucumber-test-runner/src/com/intellij/cucumber/CucumberMain.java @@ -38,7 +38,13 @@ public class CucumberMain { } public static void main(String[] args) throws IOException { - int exitStatus = run(args, Thread.currentThread().getContextClassLoader()); + int exitStatus; + try { + exitStatus = run(args, Thread.currentThread().getContextClassLoader()); + } + catch (Throwable e) { + exitStatus = 1; + } System.exit(exitStatus); }