8062070: com/sun/jdi/DoubleAgentTest.java.DoubleAgentTest fails intermittently after 8056143
authorjbachorik
Fri, 24 Oct 2014 18:33:42 +0200
changeset 27258 e66ef2eba095
parent 27236 b409bc51bc23
child 27259 8dc38c3bad7e
child 27286 8299f6b0c5fc
8062070: com/sun/jdi/DoubleAgentTest.java.DoubleAgentTest fails intermittently after 8056143 Reviewed-by: dholmes
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));
             }