Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2009-02-02 07:21:11 +0000
committerslewis2009-02-02 07:21:11 +0000
commit60cb2b5309489f582baa8a1979a87553efdb89cb (patch)
treecd859bc16418ae8be4829e8e039ca34cffa15724 /tests/bundles/org.eclipse.ecf.tests
parent72aad1f2e947f55d9753013ae0dd9879d92667f6 (diff)
downloadorg.eclipse.ecf-60cb2b5309489f582baa8a1979a87553efdb89cb.tar.gz
org.eclipse.ecf-60cb2b5309489f582baa8a1979a87553efdb89cb.tar.xz
org.eclipse.ecf-60cb2b5309489f582baa8a1979a87553efdb89cb.zip
Fix for testv20090202-0800
Diffstat (limited to 'tests/bundles/org.eclipse.ecf.tests')
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/ContainerAbstractTestCase.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/ContainerAbstractTestCase.java b/tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/ContainerAbstractTestCase.java
index aebdd858b..72a1e6fd6 100755
--- a/tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/ContainerAbstractTestCase.java
+++ b/tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/ContainerAbstractTestCase.java
@@ -20,10 +20,12 @@ import java.util.List;
import org.eclipse.ecf.core.ContainerConnectException;
import org.eclipse.ecf.core.ContainerFactory;
import org.eclipse.ecf.core.IContainer;
+import org.eclipse.ecf.core.IContainerManager;
import org.eclipse.ecf.core.identity.ID;
import org.eclipse.ecf.core.identity.IDFactory;
import org.eclipse.ecf.core.security.ConnectContextFactory;
import org.eclipse.ecf.core.security.IConnectContext;
+import org.eclipse.ecf.internal.tests.Activator;
import org.eclipse.osgi.util.NLS;
public abstract class ContainerAbstractTestCase extends ECFAbstractTestCase {
@@ -193,11 +195,17 @@ public abstract class ContainerAbstractTestCase extends ECFAbstractTestCase {
clients = createClients();
}
+ protected void removeFromContainerManager(IContainer container) {
+ IContainerManager manager = Activator.getDefault().getContainerManager();
+ if (manager != null) manager.removeContainer(container);
+ }
+
protected void cleanUpClients() {
if (clients != null) {
for (int i = 0; i < clients.length; i++) {
clients[i].disconnect();
clients[i].dispose();
+ removeFromContainerManager(clients[i]);
clients[i] = null;
}
clients = null;
@@ -209,6 +217,7 @@ public abstract class ContainerAbstractTestCase extends ECFAbstractTestCase {
serverID = null;
server.disconnect();
server.dispose();
+ removeFromContainerManager(server);
server = null;
}

Back to the top