summaryrefslogtreecommitdiff
path: root/unotest
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-11-25 05:27:15 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-11-25 05:27:15 +0100
commita1b57be652ac532ebddb3e3e53dddc35ae420f31 (patch)
treeecb05d116d27eb9c42a09a763aabb91c76957a20 /unotest
parent1cec66388eac81af2197da4fbf8fd2b00c56c7a5 (diff)
empty java stacktrace for soffice crashers, they are not interesting anyway
Diffstat (limited to 'unotest')
-rw-r--r--unotest/source/java/org/openoffice/test/OfficeConnection.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/unotest/source/java/org/openoffice/test/OfficeConnection.java b/unotest/source/java/org/openoffice/test/OfficeConnection.java
index 54a412d8ce21..8f990764ef2e 100644
--- a/unotest/source/java/org/openoffice/test/OfficeConnection.java
+++ b/unotest/source/java/org/openoffice/test/OfficeConnection.java
@@ -48,7 +48,13 @@ import static org.junit.Assert.*;
org.openoffice.test.arg.... system properties.
*/
+
public final class OfficeConnection {
+ private final class PostprocessFailedException extends java.lang.RuntimeException {
+ PostprocessFailedException() {
+ super("This likely means that soffice crashed during the test.");
+ }
+ };
/** Start up an OOo instance.
*/
public void setUp() throws Exception {
@@ -159,7 +165,14 @@ public final class OfficeConnection {
Forward pperrForward = new Forward(postprocess.getErrorStream(), System.err);
pperrForward.start();
postprocess.waitFor();
- assertEquals(0, postprocess.exitValue());
+ if(postprocess.exitValue() != 0)
+ {
+ // no ugly long java stacktrace needed here
+ PostprocessFailedException e = new PostprocessFailedException();
+ StackTraceElement[] newStackTrace = new StackTraceElement[0];
+ e.setStackTrace(newStackTrace);
+ throw e;
+ }
}
}
catch(IOException e) {}