summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/qa/complex/memCheck/CheckMemoryUsage.java14
-rw-r--r--vcl/qa/complex/persistent_window_states/PersistentWindowTest.java30
2 files changed, 7 insertions, 37 deletions
diff --git a/vcl/qa/complex/memCheck/CheckMemoryUsage.java b/vcl/qa/complex/memCheck/CheckMemoryUsage.java
index 4d9d56a30cc7..06d49dc89ce2 100644
--- a/vcl/qa/complex/memCheck/CheckMemoryUsage.java
+++ b/vcl/qa/complex/memCheck/CheckMemoryUsage.java
@@ -163,7 +163,7 @@ public class CheckMemoryUsage
* for each given document type.
*/
@Test
- public void loadAndSaveDocuments()
+ public void loadAndSaveDocuments() throws Exception
{
int nOk = 0;
int nRunThrough = 0;
@@ -248,7 +248,7 @@ public class CheckMemoryUsage
/**
* load and save exact one document
*/
- private void loadAndSaveNTimesDocument(String _sDocument, int _nCount, String _sStoreExtension)
+ private void loadAndSaveNTimesDocument(String _sDocument, int _nCount, String _sStoreExtension) throws Exception
{
System.out.println("Document: " + _sDocument);
XComponent xComponent = DesktopTools.loadDoc(getMSF(), _sDocument, null);
@@ -277,15 +277,7 @@ public class CheckMemoryUsage
}
// close the doc
XCloseable xCloseable = UnoRuntime.queryInterface(XCloseable.class, xStorable);
- try
- {
- xCloseable.close(true);
- }
- catch (com.sun.star.util.CloseVetoException e)
- {
- e.printStackTrace();
- fail("Cannot close document: test is futile, Office will surely use more space.");
- }
+ xCloseable.close(true);
}
else
{
diff --git a/vcl/qa/complex/persistent_window_states/PersistentWindowTest.java b/vcl/qa/complex/persistent_window_states/PersistentWindowTest.java
index 358e5620ebab..fd91beb4617d 100644
--- a/vcl/qa/complex/persistent_window_states/PersistentWindowTest.java
+++ b/vcl/qa/complex/persistent_window_states/PersistentWindowTest.java
@@ -282,37 +282,15 @@ public class PersistentWindowTest
return docHandle;
}
- private boolean connect()
+ private boolean connect() throws Exception
{
- try
- {
- connection.setUp();
- }
- catch (InterruptedException e)
- {
- fail("can't connect.");
- }
- catch (Exception e)
- {
- fail("can't connect.");
- }
+ connection.setUp();
return true;
}
- private boolean disconnect()
+ private boolean disconnect() throws Exception
{
- try
- {
- connection.tearDown();
- }
- catch (InterruptedException e)
- {
- fail("can't disconnect.");
- }
- catch (Exception e)
- {
- fail("can't disconnect.");
- }
+ connection.tearDown();
return true;
}