summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-11-14 17:21:11 +0100
committerStephan Bergmann <sbergman@redhat.com>2023-11-14 18:48:47 +0100
commitf9ac0d2bbbb5d6587e2b38d763e49e65e0529f3d (patch)
tree5a987ea645fbc004331b3eea736ea40c65242fa9 /qadevOOo
parent5e8bc7bda667e994cfbdf9bf4d981175dff71bae (diff)
Dispose some test components
Otherwise, JunitTest_forms_unoapi_2 left behind two instances of frm::OGridControlModel. Change-Id: Idaf7bae26b18e20821968ebf52e7864043963e03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159422 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/tests/java/ifc/io/_XPersistObject.java10
-rw-r--r--qadevOOo/tests/java/ifc/util/_XCloneable.java6
2 files changed, 16 insertions, 0 deletions
diff --git a/qadevOOo/tests/java/ifc/io/_XPersistObject.java b/qadevOOo/tests/java/ifc/io/_XPersistObject.java
index 083d0f71c692..717a611eb8e2 100644
--- a/qadevOOo/tests/java/ifc/io/_XPersistObject.java
+++ b/qadevOOo/tests/java/ifc/io/_XPersistObject.java
@@ -33,6 +33,7 @@ import com.sun.star.io.XObjectInputStream;
import com.sun.star.io.XObjectOutputStream;
import com.sun.star.io.XOutputStream;
import com.sun.star.io.XPersistObject;
+import com.sun.star.lang.XComponent;
import com.sun.star.uno.UnoRuntime;
@@ -154,6 +155,11 @@ public class _XPersistObject extends MultiMethodTest {
}
bResult &= locRes;
}
+
+ XComponent comp = UnoRuntime.queryInterface(XComponent.class, oCopy);
+ if (comp != null) {
+ comp.dispose();
+ }
} else {
Object oCopy = tParam.getMSF().createInstance(sname);
XPersistObject persCopy = UnoRuntime.queryInterface(XPersistObject.class, oCopy);
@@ -162,6 +168,10 @@ public class _XPersistObject extends MultiMethodTest {
bResult = persCopy.getServiceName().equals(sname);
+ XComponent comp = UnoRuntime.queryInterface(XComponent.class, oCopy);
+ if (comp != null) {
+ comp.dispose();
+ }
}
} catch (com.sun.star.uno.Exception e) {
diff --git a/qadevOOo/tests/java/ifc/util/_XCloneable.java b/qadevOOo/tests/java/ifc/util/_XCloneable.java
index 62de17b010a0..1f446d801aee 100644
--- a/qadevOOo/tests/java/ifc/util/_XCloneable.java
+++ b/qadevOOo/tests/java/ifc/util/_XCloneable.java
@@ -22,6 +22,7 @@ import lib.MultiMethodTest;
import java.util.Arrays;
+import com.sun.star.lang.XComponent;
import com.sun.star.lang.XServiceInfo;
import com.sun.star.lang.XTypeProvider;
import com.sun.star.uno.UnoRuntime;
@@ -57,6 +58,11 @@ public class _XCloneable extends MultiMethodTest {
result &= checkImplementationID(oObj, clone);
tRes.tested("createClone()", result) ;
+
+ XComponent comp = UnoRuntime.queryInterface(XComponent.class, clone);
+ if (comp != null) {
+ comp.dispose();
+ }
}
protected byte[] getImplementationID(XInterface ifc) {