summaryrefslogtreecommitdiffstats
path: root/unotest
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-03-02 13:49:19 +0100
committerMichael Stahl <mstahl@redhat.com>2012-03-03 00:05:29 +0100
commit90f7a3ada68f309a9d3201183ef552e59f9558fb (patch)
treecf55b91fd4a62128ae8e4e2247d7eb5d825d3347 /unotest
parentoox::drawingml::Shape: fix "lock underflow in SvxShape" assertions (diff)
downloadcore-90f7a3ada68f309a9d3201183ef552e59f9558fb.tar.gz
core-90f7a3ada68f309a9d3201183ef552e59f9558fb.zip
OfficeConnection.java: don't wait forever if terminate() fails
Diffstat (limited to 'unotest')
-rw-r--r--unotest/source/java/org/openoffice/test/OfficeConnection.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/unotest/source/java/org/openoffice/test/OfficeConnection.java b/unotest/source/java/org/openoffice/test/OfficeConnection.java
index da99d0d1922e..5eb3afa88723 100644
--- a/unotest/source/java/org/openoffice/test/OfficeConnection.java
+++ b/unotest/source/java/org/openoffice/test/OfficeConnection.java
@@ -128,6 +128,12 @@ public final class OfficeConnection {
context = null;
try {
desktopTerminated = desktop.terminate();
+ if (!desktopTerminated) {
+ // in case terminate() fails we would wait forever
+ // for the process to die, so kill it
+ process.destroy();
+ }
+ assertTrue(desktopTerminated);
} catch (DisposedException e) {}
// it appears that DisposedExceptions can already happen
// while receiving the response of the terminate call
@@ -142,7 +148,6 @@ public final class OfficeConnection {
}
boolean outTerminated = outForward == null || outForward.terminated();
boolean errTerminated = errForward == null || errForward.terminated();
- assertTrue(desktopTerminated);
assertEquals(0, code);
assertTrue(outTerminated);
assertTrue(errTerminated);