Commit 3d97578f authored by Martti Käärik's avatar Martti Käärik
Browse files

Need to catch InterruptedException locally #187

parent 58549349
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -1158,7 +1158,7 @@ public class JUnitTestGenerator extends Renderer {
				blockClose();

				blockClose();
				append("catch (InterruptedException e) {} ");
				append("catch (" + INTERRUPTED_EXCEPTION + " e) {} ");
				append("catch (Throwable e) ");
				blockOpen();
				append("synchronized (" + errorName + ") ");
@@ -1438,7 +1438,7 @@ public class JUnitTestGenerator extends Renderer {
				thrownExceptions.add(STOP_EXCEPTION);

				blockClose();
				append("catch (" + FUTURE_EXECUTION_EXCEPTION + " e) ");
				append("catch (" + FUTURE_EXECUTION_EXCEPTION + " | " + INTERRUPTED_EXCEPTION + " e) ");
				blockOpen();
				line("if (e.getCause() instanceof RuntimeException) throw (RuntimeException) e.getCause();");
				line("throw new RuntimeException(e.getCause());");
@@ -1458,8 +1458,6 @@ public class JUnitTestGenerator extends Renderer {
				line("if (!" + interruptedName + ") break;");
				blockClose(); // while

				thrownExceptions.add(INTERRUPTED_EXCEPTION);

				newLine();
			}