sb118: removed timeouts and forced process termination from test code (to make failures better debuggable)

This commit is contained in:
sb
2010-02-23 16:53:18 +01:00
parent fdcd4b7a81
commit cd48c2897e
2 changed files with 23 additions and 40 deletions

View File

@ -74,11 +74,7 @@ public final class OfficeConnection {
"uno:" + description +
";urp;StarOffice.ServiceManager"));
break;
} catch (NoConnectException e) {
if (i == 600) { // 600 sec
throw e;
}
}
} catch (NoConnectException e) {}
assertNull(waitForProcess(process, 1000)); // 1 sec
}
}
@ -99,15 +95,14 @@ public final class OfficeConnection {
// receiving the response of the terminate call
desktop = null;
}
Integer code = 0;
int code = 0;
if (process != null) {
code = waitForProcess(process, 600000); // 600 sec
process.destroy();
code = process.waitFor();
}
boolean outTerminated = outForward == null || outForward.terminated();
boolean errTerminated = errForward == null || errForward.terminated();
assertTrue(desktopTerminated);
assertEquals(new Integer(0), code);
assertEquals(0, code);
assertTrue(outTerminated);
assertTrue(errTerminated);
}