Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChristian W. Damus2013-09-25 14:56:32 -0400
committerChristian W. Damus2013-09-25 14:56:32 -0400
commitf0f0cdd30fbd6134b766011d22a35313d44a7716 (patch)
treef20c87b58da5d6dbd812a5b710e30c123b4ea1ad /tests
parentc00ac21e3e3d1a509613f990db4f2c0c058d4efb (diff)
downloadorg.eclipse.papyrus-f0f0cdd30fbd6134b766011d22a35313d44a7716.tar.gz
org.eclipse.papyrus-f0f0cdd30fbd6134b766011d22a35313d44a7716.tar.xz
org.eclipse.papyrus-f0f0cdd30fbd6134b766011d22a35313d44a7716.zip
415373: [CDO] Better handling of repositories left by previous tests
https://bugs.eclipse.org/bugs/show_bug.cgi?id=415373
Diffstat (limited to 'tests')
-rw-r--r--tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/tests/AbstractPapyrusCDOTest.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/tests/AbstractPapyrusCDOTest.java b/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/tests/AbstractPapyrusCDOTest.java
index 73f3b43018a..f99cc108e19 100644
--- a/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/tests/AbstractPapyrusCDOTest.java
+++ b/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/tests/AbstractPapyrusCDOTest.java
@@ -88,9 +88,16 @@ public abstract class AbstractPapyrusCDOTest {
repoURL = "jvm://default?repositoryName=" + repo.getName();
if(needPapyrusRepository()) {
- repository = PapyrusRepositoryManager.INSTANCE.createRepository(repoURL);
+ repository = PapyrusRepositoryManager.INSTANCE.getRepository(repoURL);
+ if(repository == null) {
+ repository = PapyrusRepositoryManager.INSTANCE.createRepository(repoURL);
+ }
+
repository.setName(name.getMethodName());
- repository.connect();
+
+ if(!repository.isConnected()) {
+ repository.connect();
+ }
CDOSession session = ((IInternalPapyrusRepository)repository).getCDOSession();

Back to the top