# HG changeset patch # User jbachorik # Date 1414168422 -7200 # Node ID e66ef2eba095f4c3a7f69ee488449c3a00008200 # Parent b409bc51bc23cfd51f2bd04ea919ec83535af9d0 8062070: com/sun/jdi/DoubleAgentTest.java.DoubleAgentTest fails intermittently after 8056143 Reviewed-by: dholmes diff -r b409bc51bc23 -r e66ef2eba095 jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java --- a/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java Wed Jul 05 20:05:30 2017 +0200 +++ b/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java Fri Oct 24 18:33:42 2014 +0200 @@ -319,13 +319,14 @@ return output; } catch (Throwable t) { + if (p != null) { + p.destroyForcibly().waitFor(); + } + failed = true; System.out.println("executeProcess() failed: " + t); throw t; } finally { - if (p != null) { - p.destroyForcibly().waitFor(); - } if (failed) { System.err.println(getProcessLog(pb, output)); }