Skip to content

Commit 1be6c07

Browse files
committed
Avoid the extra termination
1 parent d7562a5 commit 1be6c07

File tree

1 file changed

+0
-27
lines changed
  • dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework

1 file changed

+0
-27
lines changed

dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/BaseTestCase.java

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -696,36 +696,9 @@ public void doAfterTest() throws Exception {
696696
out.println("isTerminated: false");
697697
}
698698
}
699-
boolean failed = false;
700-
for (IProcess process : processes) {
701-
out.println("TERMINATING");
702-
out.println("Process: " + process);
703-
704-
if (process instanceof RuntimeProcess runtimeProcess) {
705-
Field field = RuntimeProcess.class.getDeclaredField("fProcess");
706-
field.trySetAccessible();
707-
Process javaProcess = (Process) field.get(runtimeProcess);
708-
if (javaProcess == null) {
709-
out.println("javaProcess: null");
710-
} else {
711-
javaProcess.destroy();
712-
out.println("WAITING");
713-
boolean waitFor = javaProcess.waitFor(1, TimeUnit.SECONDS);
714-
out.println("waitFor: " + waitFor);
715-
if (waitFor) {
716-
out.println("exitValue: " + javaProcess.exitValue());
717-
} else {
718-
failed = true;
719-
}
720-
}
721-
}
722-
}
723699
String info = byteArrayOutputStream.toString("UTF-8");
724700
try {
725701
fLaunch.terminate();
726-
if (failed) {
727-
throw new RuntimeException("Failed to terminate\ninfo:\n" + info);
728-
}
729702
} catch (DebugException e) {
730703
IStatus status = e.getStatus();
731704
if (status != null) {

0 commit comments

Comments
 (0)