Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBAnnotationsTest.java36
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBConfig.java30
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBConfigs.java32
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DISABLE_AttributeTest.java43
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DISABLE_ExternalReferenceTest.java35
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DISABLE_FeatureMapTest.java27
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DISABLE_XATransactionTest.java42
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DISABLE_XRefTest.java47
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DerbyConfig.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/H2Config.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/H2OfflineConfig.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/HsqldbConfig.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/MysqlConfig.java20
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/PostgresqlConfig.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db4o/src/org/eclipse/emf/cdo/tests/db4o/DB4OConfig.java27
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/HibernateConfig.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.mongodb/src/org/eclipse/emf/cdo/tests/mongodb/MongoDBConfig.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/ObjyConfig.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AttributeTest.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AuditTest.java13
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BackupTest.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BranchingTest.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ChangeSubscriptionTest.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CommitInfoTest.java82
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CompareTest.java25
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ConflictResolverTest.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CrossReferenceTest.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ExternalReferenceTest.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/FeatureMapTest.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingManagerRestartRepositoryTest.java11
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingNotificationsTest.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/MEMStoreQueryTest.java12
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/MergingTest.java26
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RepositoryTest.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionDeltaCascadingBranchesTest.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionDeltaInBranchTest.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionManagerTest.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/StateMachineTest.java149
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/StickyViewsTest.java23
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/WorkspaceTest.java33
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/XATransactionTest.java18
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_260756_Test.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_279982_Test.java16
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_283985_1_Test.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_283985_3_Test.java13
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_303807_Test.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_305527_Test.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_306998_Test.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_313326_Test.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_314264_Test.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_315043_Test.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_324084_Test.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_324635_Test.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_324756_Test.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_325866_Test.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_326518_Test.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_327604_Test.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_329753_Test.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_330052_Test.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_333299_Test.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_336382_Test.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_337054_Test.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_342135_Test.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_343471_Test.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IConfig.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IContainerConfig.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IModelConfig.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IRepositoryConfig.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IScenario.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/ISessionConfig.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ConfigTest.java85
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ConfigTestSuite.java79
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ContainerConfig.java12
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ModelConfig.java12
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/RepositoryConfig.java69
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/Scenario.java11
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/SessionConfig.java31
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/offline/Bugzilla_328352_Test.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/offline/Bugzilla_329014_Test.java14
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/CaseInsensitiveStringSet.java128
80 files changed, 747 insertions, 748 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBAnnotationsTest.java b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBAnnotationsTest.java
index 493e0fd066..1e9ddbfa9b 100644
--- a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBAnnotationsTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBAnnotationsTest.java
@@ -15,6 +15,7 @@ package org.eclipse.emf.cdo.tests.db;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.Skips;
import org.eclipse.emf.cdo.tests.db.verifier.DBStoreVerifier;
import org.eclipse.emf.cdo.tests.model1.Model1Package;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
@@ -35,6 +36,8 @@ import java.sql.ResultSet;
*
* @author Kai Schlamp
*/
+// XXX PSQL fails, too - need to investigate
+@Skips("Postgresql")
public class DBAnnotationsTest extends AbstractCDOTest
{
private static int modelCounter;
@@ -65,14 +68,10 @@ public class DBAnnotationsTest extends AbstractCDOTest
session.close();
}
+ // HSQL does not support length annotations
+ @Skips("Hsqldb")
public void testLengthAnnotationNegative() throws Exception
{
- // HSQL does not support length annotations
- skipTest(getRepositoryConfig() instanceof HsqldbConfig);
-
- // XXX PSQL fails, too - need to investigate
- skipTest(getRepositoryConfig() instanceof PostgresqlConfig);
-
msg("Opening session");
EPackage model1 = createModel();
addLengthAnnotation(model1, "8");
@@ -110,9 +109,6 @@ public class DBAnnotationsTest extends AbstractCDOTest
public void testLengthAnnotationByMetaData() throws CommitException
{
- // XXX [PSQL] disabled because of Bug 290095
- skipTest(getRepositoryConfig() instanceof PostgresqlConfig);
-
msg("Opening session");
final EPackage model1 = createModel();
addLengthAnnotation(model1, "8");
@@ -149,14 +145,10 @@ public class DBAnnotationsTest extends AbstractCDOTest
}.verify();
}
+ // HSQL does not support type annotations
+ @Skips("Hsqldb")
public void testTypeAnnotationByMetaData() throws CommitException
{
- // XXX [PSQL] disabled because of Bug 290095
- skipTest(getRepositoryConfig() instanceof PostgresqlConfig);
-
- // HSQL does not support type annotations
- skipTest(getRepositoryConfig() instanceof HsqldbConfig);
-
msg("Opening session");
final EPackage model1 = createModel();
addTypeAnnotation(model1, "CLOB");
@@ -195,9 +187,6 @@ public class DBAnnotationsTest extends AbstractCDOTest
public void testTableNameAnnotationByMetaData() throws CommitException
{
- // XXX [PSQL] disabled because of Bug 290095
- skipTest(getRepositoryConfig() instanceof PostgresqlConfig);
-
msg("Opening session");
EPackage model1 = createModel();
addTableNameAnnotation(model1, "Subject");
@@ -235,9 +224,6 @@ public class DBAnnotationsTest extends AbstractCDOTest
public void testColumnNameAnnotationByMetaData() throws CommitException
{
- // XXX [PSQL] disabled because of Bug 290095
- skipTest(getRepositoryConfig() instanceof PostgresqlConfig);
-
msg("Opening session");
final EPackage model1 = createModel();
addColumnNameAnnotation(model1, "TOPIC");
@@ -274,14 +260,10 @@ public class DBAnnotationsTest extends AbstractCDOTest
}.verify();
}
+ // HSQL does not support type annotations
+ @Skips("Hsqldb")
public void testColumnNameTypeAnnotationByMetaData() throws CommitException
{
- // HSQL does not support type annotations
- skipTest(getRepositoryConfig() instanceof HsqldbConfig);
-
- // XXX [PSQL] disabled because of Bug 290095
- skipTest(getRepositoryConfig() instanceof PostgresqlConfig);
-
msg("Opening session");
final EPackage model1 = createModel();
addColumnNameAndTypeAnnoation(model1, "TOPIC", "CLOB");
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBConfig.java b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBConfig.java
index 907ea8bf89..3cbcbea4ea 100644
--- a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBConfig.java
@@ -27,12 +27,17 @@ import javax.sql.DataSource;
import java.util.HashMap;
import java.util.Map;
+import java.util.Set;
/**
* @author Eike Stepper
*/
public abstract class DBConfig extends RepositoryConfig
{
+ public static final String CAPABILITY_RANGES = "DB.ranges";
+
+ public static final String CAPABILITY_COPY_ON_BRANCH = "DB.copy.on.branch";
+
private static final long serialVersionUID = 1L;
private boolean withRanges;
@@ -47,6 +52,31 @@ public abstract class DBConfig extends RepositoryConfig
this.copyOnBranch = copyOnBranch;
}
+ @Override
+ public void initCapabilities(Set<String> capabilities)
+ {
+ super.initCapabilities(capabilities);
+ capabilities.add(getDBAdapterName());
+
+ if (isWithRanges())
+ {
+ capabilities.add(CAPABILITY_RANGES);
+ }
+
+ if (isCopyOnBranch())
+ {
+ capabilities.add(CAPABILITY_COPY_ON_BRANCH);
+ }
+ }
+
+ protected abstract String getDBAdapterName();
+
+ @Override
+ protected String getStoreName()
+ {
+ return "DB";
+ }
+
public boolean isWithRanges()
{
return withRanges;
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBConfigs.java b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBConfigs.java
index 5330d75a6d..87a1c98377 100644
--- a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBConfigs.java
+++ b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBConfigs.java
@@ -12,17 +12,12 @@
package org.eclipse.emf.cdo.tests.db;
import org.eclipse.emf.cdo.tests.AllConfigs;
-import org.eclipse.emf.cdo.tests.AttributeTest;
import org.eclipse.emf.cdo.tests.AuditSameSessionTest;
import org.eclipse.emf.cdo.tests.AuditTest;
import org.eclipse.emf.cdo.tests.BranchingSameSessionTest;
import org.eclipse.emf.cdo.tests.BranchingTest;
-import org.eclipse.emf.cdo.tests.ExternalReferenceTest;
-import org.eclipse.emf.cdo.tests.FeatureMapTest;
import org.eclipse.emf.cdo.tests.MEMStoreQueryTest;
import org.eclipse.emf.cdo.tests.MergingTest;
-import org.eclipse.emf.cdo.tests.XATransactionTest;
-import org.eclipse.emf.cdo.tests.XRefTest;
import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_252214_Test;
import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_303807_Test;
import org.eclipse.emf.cdo.tests.config.IScenario;
@@ -63,29 +58,30 @@ public abstract class DBConfigs extends AllConfigs
testClasses.remove(Bugzilla_252214_Test.class);
}
- // fails because of Bug 284109
- testClasses.remove(XATransactionTest.class);
- testClasses.add(DISABLE_XATransactionTest.class);
+ // // fails because of Bug 284109
+ // testClasses.remove(XATransactionTest.class);
+ // testClasses.add(DISABLE_XATransactionTest.class);
// XXX Range-based audit mapping does not support queryXRefs for now
- testClasses.remove(XRefTest.class);
- testClasses.add(DISABLE_XRefTest.class);
+ // testClasses.remove(XRefTest.class);
+ // testClasses.add(DISABLE_XRefTest.class);
// ------------ tests below only fail for PostgreSQL
// ------------ therefore they are overridden and
// ------------ skipConfig for PSQL is used temporarily
- // XXX [PSQL] disabled because of Bug 289445
- testClasses.remove(AttributeTest.class);
- testClasses.add(DISABLE_AttributeTest.class);
- testClasses.remove(FeatureMapTest.class);
- testClasses.add(DISABLE_FeatureMapTest.class);
+ // // XXX [PSQL] disabled because of Bug 289445
+ // testClasses.remove(AttributeTest.class);
+ // testClasses.add(DISABLE_AttributeTest.class);
+
+ // testClasses.remove(FeatureMapTest.class);
+ // testClasses.add(DISABLE_FeatureMapTest.class);
// XXX [PSQL] disabled because of Bug 290095
// using skipconfig in DBAnnotationTest
- // XXX [PSQL] disabled because of Bug 290097
- testClasses.remove(ExternalReferenceTest.class);
- testClasses.add(DISABLE_ExternalReferenceTest.class);
+ // // XXX [PSQL] disabled because of Bug 290097
+ // testClasses.remove(ExternalReferenceTest.class);
+ // testClasses.add(DISABLE_ExternalReferenceTest.class);
}
}
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DISABLE_AttributeTest.java b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DISABLE_AttributeTest.java
deleted file mode 100644
index a0b73b3969..0000000000
--- a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DISABLE_AttributeTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.tests.db;
-
-import org.eclipse.emf.cdo.tests.AttributeTest;
-
-/**
- * @author Eike Stepper
- */
-public class DISABLE_AttributeTest extends AttributeTest
-{
- @Override
- public void testByteArray() throws Exception
- {
- // XXX disabled because of Bug 289445
- skipTest(getRepositoryConfig() instanceof PostgresqlConfig);
- super.testByteArray();
- }
-
- @Override
- public void testByteArrayEmpty() throws Exception
- {
- // XXX disabled because of Bug 289445
- skipTest(getRepositoryConfig() instanceof PostgresqlConfig);
- super.testByteArrayEmpty();
- }
-
- @Override
- public void testByteArrayNull() throws Exception
- {
- // XXX disabled because of Bug 289445
- skipTest(getRepositoryConfig() instanceof PostgresqlConfig);
- super.testByteArrayNull();
- }
-}
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DISABLE_ExternalReferenceTest.java b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DISABLE_ExternalReferenceTest.java
deleted file mode 100644
index 453ff8e059..0000000000
--- a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DISABLE_ExternalReferenceTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.tests.db;
-
-import org.eclipse.emf.cdo.tests.ExternalReferenceTest;
-
-/**
- * @author Stefan Winkler
- */
-public class DISABLE_ExternalReferenceTest extends ExternalReferenceTest
-{
- @Override
- public void testOneXMIResourceManyViewsOnOneResourceSet() throws Exception
- {
- // XXX disabled because of Bug 290097
- skipTest(getRepositoryConfig() instanceof PostgresqlConfig);
- super.testOneXMIResourceManyViewsOnOneResourceSet();
- }
-
- @Override
- public void testManyViewsOnOneResourceSet() throws Exception
- {
- // XXX disabled because of Bug 290097
- skipTest(getRepositoryConfig() instanceof PostgresqlConfig);
- super.testManyViewsOnOneResourceSet();
- }
-}
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DISABLE_FeatureMapTest.java b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DISABLE_FeatureMapTest.java
deleted file mode 100644
index 7a2b73443f..0000000000
--- a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DISABLE_FeatureMapTest.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.tests.db;
-
-import org.eclipse.emf.cdo.tests.FeatureMapTest;
-
-/**
- * @author Eike Stepper
- */
-public class DISABLE_FeatureMapTest extends FeatureMapTest
-{
- // underscore-disabled because parent is also disabled because of Bug 293405
- @Override
- public void testFeatureMaps() throws Exception
- {
- skipTest(getRepositoryConfig() instanceof PostgresqlConfig);
- super.testFeatureMaps();
- }
-}
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DISABLE_XATransactionTest.java b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DISABLE_XATransactionTest.java
deleted file mode 100644
index 4b00c5e31f..0000000000
--- a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DISABLE_XATransactionTest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.tests.db;
-
-import org.eclipse.emf.cdo.tests.XATransactionTest;
-
-/**
- * @author Eike Stepper
- */
-public class DISABLE_XATransactionTest extends XATransactionTest
-{
- @Override
- public void testNotUsingXATransaction_Exception() throws Exception
- {
- // XXX test disabled
- }
-
- @Override
- public void testCommitFromTransactionDisabled() throws Exception
- {
- // XXX disabled because of Bug 290097
- skipTest(getRepositoryConfig() instanceof PostgresqlConfig);
- super.testCommitFromTransactionDisabled();
- }
-
- @CleanRepositoriesBefore
- @Override
- public void test_ExceptionInReadingStream() throws Exception
- {
- // XXX disabled because of Bug 290097
- skipTest(getRepositoryConfig() instanceof PostgresqlConfig);
- super.test_ExceptionInReadingStream();
- }
-}
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DISABLE_XRefTest.java b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DISABLE_XRefTest.java
deleted file mode 100644
index 0118ffb72b..0000000000
--- a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DISABLE_XRefTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.tests.db;
-
-import org.eclipse.emf.cdo.tests.XRefTest;
-
-/**
- * @author Eike Stepper
- */
-public class DISABLE_XRefTest extends XRefTest
-{
- @Override
- protected void doSetUp() throws Exception
- {
- super.doSetUp();
- // skipConfig(H2Config.RANGE_INSTANCE);
- }
-
- // @Override
- // public void testCrossReferenceMultivalueEReferenceQuery() throws Exception
- // {
- // skipConfig(H2.ReusableFolder.RANGE_INSTANCE);
- // super.testCrossReferenceMultivalueEReferenceQuery();
- // }
- //
- // @Override
- // public void testXRefsToMany() throws Exception
- // {
- // skipConfig(H2.ReusableFolder.RANGE_INSTANCE);
- // super.testXRefsToMany();
- // }
- //
- // @Override
- // public void testXRefsToOne() throws Exception
- // {
- // skipConfig(H2.ReusableFolder.RANGE_INSTANCE);
- // super.testXRefsToOne();
- // }
-}
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DerbyConfig.java b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DerbyConfig.java
index eb5e003dcd..7ddff8806f 100644
--- a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DerbyConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DerbyConfig.java
@@ -33,6 +33,8 @@ import java.util.HashMap;
*/
public class DerbyConfig extends DBConfig
{
+ public static final String DB_ADAPTER_NAME = "Derby";
+
private static final long serialVersionUID = 1L;
private static HashMap<String, File> dbFolders = new HashMap<String, File>();
@@ -41,7 +43,13 @@ public class DerbyConfig extends DBConfig
public DerbyConfig(boolean supportingAudits, boolean supportingBranches, IDGenerationLocation idGenerationLocation)
{
- super("Derby", supportingAudits, supportingBranches, false, false, idGenerationLocation);
+ super(DB_ADAPTER_NAME, supportingAudits, supportingBranches, false, false, idGenerationLocation);
+ }
+
+ @Override
+ protected String getDBAdapterName()
+ {
+ return DB_ADAPTER_NAME;
}
public Collection<File> getDBFolders()
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/H2Config.java b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/H2Config.java
index 600b0c34e3..870ac95618 100644
--- a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/H2Config.java
+++ b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/H2Config.java
@@ -31,6 +31,8 @@ import java.sql.Statement;
*/
public class H2Config extends DBConfig
{
+ public static final String DB_ADAPTER_NAME = "H2";
+
private static final long serialVersionUID = 1L;
private static File reusableFolder;
@@ -42,7 +44,13 @@ public class H2Config extends DBConfig
public H2Config(boolean supportingAudits, boolean supportingBranches, boolean withRanges, boolean copyOnBranch,
IDGenerationLocation idGenerationLocation)
{
- super("H2", supportingAudits, supportingBranches, withRanges, copyOnBranch, idGenerationLocation);
+ super(DB_ADAPTER_NAME, supportingAudits, supportingBranches, withRanges, copyOnBranch, idGenerationLocation);
+ }
+
+ @Override
+ protected String getDBAdapterName()
+ {
+ return DB_ADAPTER_NAME;
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/H2OfflineConfig.java b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/H2OfflineConfig.java
index 9f851003f5..ff5a88a14a 100644
--- a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/H2OfflineConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/H2OfflineConfig.java
@@ -57,6 +57,12 @@ public class H2OfflineConfig extends OfflineConfig
this.copyOnBranch = copyOnBranch;
}
+ @Override
+ protected String getStoreName()
+ {
+ return MEMConfig.STORE_NAME;
+ }
+
public boolean isWithRanges()
{
return withRanges;
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/HsqldbConfig.java b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/HsqldbConfig.java
index 0bab24ad70..b9bc2b38fd 100644
--- a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/HsqldbConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/HsqldbConfig.java
@@ -37,6 +37,8 @@ import java.util.Map;
*/
public class HsqldbConfig extends DBConfig
{
+ public static final String DB_ADAPTER_NAME = "Hsqldb";
+
private static final long serialVersionUID = 1L;
public static boolean USE_VERIFIER = false;
@@ -45,7 +47,13 @@ public class HsqldbConfig extends DBConfig
public HsqldbConfig(boolean supportingAudits, boolean supportingBranches, IDGenerationLocation idGenerationLocation)
{
- super("Hsqldb", supportingAudits, supportingBranches, false, false, idGenerationLocation);
+ super(DB_ADAPTER_NAME, supportingAudits, supportingBranches, false, false, idGenerationLocation);
+ }
+
+ @Override
+ protected String getDBAdapterName()
+ {
+ return DB_ADAPTER_NAME;
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/MysqlConfig.java b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/MysqlConfig.java
index 07a59f7845..0b6fb53431 100644
--- a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/MysqlConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/MysqlConfig.java
@@ -33,11 +33,7 @@ import java.util.Map;
*/
public class MysqlConfig extends DBConfig
{
- private static final long serialVersionUID = 1L;
-
- private transient DataSource setupDataSource;
-
- private transient List<String> databases = new ArrayList<String>();
+ public static final String DB_ADAPTER_NAME = "Mysql";
/**
* Instructions to test with MySQL: - create a mysql instance - set HOST to the host where the DB is running
@@ -50,9 +46,21 @@ public class MysqlConfig extends DBConfig
public static final String PASS = "root";
+ private static final long serialVersionUID = 1L;
+
+ private transient DataSource setupDataSource;
+
+ private transient List<String> databases = new ArrayList<String>();
+
public MysqlConfig(boolean supportingAudits, boolean supportingBranches, IDGenerationLocation idGenerationLocation)
{
- super("Mysql", supportingAudits, supportingBranches, false, false, idGenerationLocation);
+ super(DB_ADAPTER_NAME, supportingAudits, supportingBranches, false, false, idGenerationLocation);
+ }
+
+ @Override
+ protected String getDBAdapterName()
+ {
+ return DB_ADAPTER_NAME;
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/PostgresqlConfig.java b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/PostgresqlConfig.java
index 29a9a7b3da..8e0516a56e 100644
--- a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/PostgresqlConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/PostgresqlConfig.java
@@ -31,6 +31,8 @@ import java.sql.SQLException;
*/
public class PostgresqlConfig extends DBConfig
{
+ public static final String DB_ADAPTER_NAME = "Postgresql";
+
private static final long serialVersionUID = 1L;
private transient Jdbc3SimpleDataSource dataSource;
@@ -42,7 +44,13 @@ public class PostgresqlConfig extends DBConfig
public PostgresqlConfig(boolean supportingAudits, boolean supportingBranches,
IDGenerationLocation idGenerationLocation)
{
- super("Postgresql", supportingAudits, supportingBranches, false, false, idGenerationLocation);
+ super(DB_ADAPTER_NAME, supportingAudits, supportingBranches, false, false, idGenerationLocation);
+ }
+
+ @Override
+ protected String getDBAdapterName()
+ {
+ return DB_ADAPTER_NAME;
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.tests.db4o/src/org/eclipse/emf/cdo/tests/db4o/DB4OConfig.java b/plugins/org.eclipse.emf.cdo.tests.db4o/src/org/eclipse/emf/cdo/tests/db4o/DB4OConfig.java
index aa013c1e77..2196551c39 100644
--- a/plugins/org.eclipse.emf.cdo.tests.db4o/src/org/eclipse/emf/cdo/tests/db4o/DB4OConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests.db4o/src/org/eclipse/emf/cdo/tests/db4o/DB4OConfig.java
@@ -11,12 +11,17 @@ import java.io.File;
import java.io.IOException;
import java.net.ServerSocket;
import java.util.Random;
+import java.util.Set;
/**
* @author Victor Roldan Betancort
*/
public class DB4OConfig extends RepositoryConfig
{
+ public static final String CAPABILITY_MEM = "DB4O.mem";
+
+ public static final String CAPABILITY_NET = "DB4O.net";
+
private static final Random RANDOM = new Random(System.currentTimeMillis());
private static final long serialVersionUID = 1L;
@@ -27,10 +32,30 @@ public class DB4OConfig extends RepositoryConfig
public DB4OConfig(boolean mem)
{
- super("DB4O", false, false, IDGenerationLocation.STORE);
+ super("DB4O-" + (mem ? "mem" : "net"), false, false, IDGenerationLocation.STORE);
this.mem = mem;
}
+ @Override
+ public void initCapabilities(Set<String> capabilities)
+ {
+ super.initCapabilities(capabilities);
+ if (mem)
+ {
+ capabilities.add(CAPABILITY_MEM);
+ }
+ else
+ {
+ capabilities.add(CAPABILITY_NET);
+ }
+ }
+
+ @Override
+ protected String getStoreName()
+ {
+ return "DB4O";
+ }
+
public boolean isMem()
{
return mem;
diff --git a/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/HibernateConfig.java b/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/HibernateConfig.java
index 7a631a8b3d..48dd626141 100644
--- a/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/HibernateConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/HibernateConfig.java
@@ -28,6 +28,8 @@ import java.util.Properties;
*/
public class HibernateConfig extends RepositoryConfig
{
+ public static final String STAORE_NAME = "Hibernate";
+
public static final HibernateConfig INSTANCE = new HibernateConfig();
public static final String MAPPING_FILE = "mappingfile";
@@ -38,7 +40,13 @@ public class HibernateConfig extends RepositoryConfig
public HibernateConfig()
{
- super("Hibernate", false, false, IDGenerationLocation.STORE);
+ super(STAORE_NAME, false, false, IDGenerationLocation.STORE);
+ }
+
+ @Override
+ protected String getStoreName()
+ {
+ return STAORE_NAME;
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.tests.mongodb/src/org/eclipse/emf/cdo/tests/mongodb/MongoDBConfig.java b/plugins/org.eclipse.emf.cdo.tests.mongodb/src/org/eclipse/emf/cdo/tests/mongodb/MongoDBConfig.java
index c1d85751ee..c031016e91 100644
--- a/plugins/org.eclipse.emf.cdo.tests.mongodb/src/org/eclipse/emf/cdo/tests/mongodb/MongoDBConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests.mongodb/src/org/eclipse/emf/cdo/tests/mongodb/MongoDBConfig.java
@@ -27,11 +27,19 @@ import com.mongodb.MongoURI;
*/
public class MongoDBConfig extends RepositoryConfig
{
+ public static final String STORE_NAME = "MongoDB";
+
private static final long serialVersionUID = 1L;
public MongoDBConfig(boolean supportingAudits, boolean supportingBranches, IDGenerationLocation idGenerationLocation)
{
- super("MongoDB", supportingAudits, supportingBranches, idGenerationLocation);
+ super(STORE_NAME, supportingAudits, supportingBranches, idGenerationLocation);
+ }
+
+ @Override
+ protected String getStoreName()
+ {
+ return STORE_NAME;
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/ObjyConfig.java b/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/ObjyConfig.java
index 4374296897..46e6972709 100644
--- a/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/ObjyConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/ObjyConfig.java
@@ -21,19 +21,27 @@ import org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig;
*/
public class ObjyConfig extends RepositoryConfig
{
+ public static final String STORE_NAME = "Objy";
+
private static final long serialVersionUID = 1L;
private static ObjectivityStoreConfig storeConfig = new ObjectivityStoreConfig();
public ObjyConfig(boolean supportingAudits, boolean supportingBranches)
{
- super("Objy", supportingAudits, supportingBranches, IDGenerationLocation.STORE);
+ super(STORE_NAME, supportingAudits, supportingBranches, IDGenerationLocation.STORE);
org.eclipse.emf.cdo.server.internal.objectivity.bundle.OM.DEBUG.setEnabled(true);
org.eclipse.emf.cdo.server.internal.objectivity.bundle.OM.INFO.setEnabled(true);
}
@Override
+ protected String getStoreName()
+ {
+ return STORE_NAME;
+ }
+
+ @Override
protected void deactivateRepositories()
{
super.deactivateRepositories();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AttributeTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AttributeTest.java
index 721bb72213..b6f79351d7 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AttributeTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AttributeTest.java
@@ -99,6 +99,8 @@ public class AttributeTest extends AbstractCDOTest
}
}
+ // XXX disabled because of Bug 289445
+ @Skips("Postgresql")
public void testByteArray() throws Exception
{
byte saveByteArray[] = new byte[] { 0, 1, 2, 3, 0, 1, 0, 100 };
@@ -139,6 +141,8 @@ public class AttributeTest extends AbstractCDOTest
}
}
+ // XXX disabled because of Bug 289445
+ @Skips("Postgresql")
public void testByteArrayEmpty() throws Exception
{
byte saveByteArray[] = new byte[0];
@@ -174,6 +178,8 @@ public class AttributeTest extends AbstractCDOTest
}
}
+ // XXX disabled because of Bug 289445
+ @Skips("Postgresql")
public void testByteArrayNull() throws Exception
{
byte saveByteArray[] = null;
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AuditTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AuditTest.java
index 7c4325eeed..3c92fe9f7d 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AuditTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AuditTest.java
@@ -12,6 +12,8 @@ package org.eclipse.emf.cdo.tests;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.Requires;
import org.eclipse.emf.cdo.tests.model1.Company;
import org.eclipse.emf.cdo.tests.model5.GenListOfInt;
import org.eclipse.emf.cdo.tests.model5.Model5Factory;
@@ -31,17 +33,11 @@ import java.util.List;
/**
* @author Eike Stepper
*/
+@Requires(IRepositoryConfig.CAPABILITY_AUDITING)
public class AuditTest extends AbstractCDOTest
{
protected CDOSession session1;
- @Override
- protected void doSetUp() throws Exception
- {
- super.doSetUp();
- skipUnlessAuditing();
- }
-
protected CDOSession openSession1()
{
session1 = openSession();
@@ -295,10 +291,9 @@ public class AuditTest extends AbstractCDOTest
session.close();
}
+ @Requires(IRepositoryConfig.CAPABILITY_RESTARTABLE)
public void testConsistentHistoryForIsMany() throws Exception
{
- skipConfig(MEM);
-
ArrayList<List<Integer>> history = new ArrayList<List<Integer>>();
ArrayList<Long> timestamps = new ArrayList<Long>();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BackupTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BackupTest.java
index 868714cd7c..7c6ab034c8 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BackupTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BackupTest.java
@@ -254,12 +254,9 @@ public class BackupTest extends AbstractCDOTest
* {@link org.eclipse.emf.cdo.server.IStoreAccessor.Raw#rawStore(org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision, org.eclipse.net4j.util.om.monitor.OMMonitor)
* rawStore()} is not adequate with range-based list mappings because they need deltas!
*/
+ @Skips("DB.ranges")
public void testImport() throws Exception
{
- String configName = getRepositoryConfig().getName();
- skipTest(configName.contains("range-based"));
- skipTest(configName.contains("ranges"));
-
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
CDOResource resource = transaction.createResource(getResourcePath("/res1"));
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BranchingTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BranchingTest.java
index 04f549a076..6013465b5b 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BranchingTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BranchingTest.java
@@ -26,7 +26,9 @@ import org.eclipse.emf.cdo.internal.server.mem.MEMStore;
import org.eclipse.emf.cdo.server.IStore;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.spi.common.branch.CDOBranchUtil;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.CleanRepositoriesBefore;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.Requires;
import org.eclipse.emf.cdo.tests.model1.OrderDetail;
import org.eclipse.emf.cdo.tests.model1.Product1;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
@@ -49,6 +51,7 @@ import java.util.Map;
/**
* @author Eike Stepper
*/
+@Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
@CleanRepositoriesBefore
public class BranchingTest extends AbstractCDOTest
{
@@ -58,7 +61,6 @@ public class BranchingTest extends AbstractCDOTest
protected void doSetUp() throws Exception
{
super.doSetUp();
- skipUnlessBranching();
Field disableGC = ReflectUtil.getField(AbstractCDORevisionCache.class, "disableGC");
ReflectUtil.setValue(disableGC, null, true);
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ChangeSubscriptionTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ChangeSubscriptionTest.java
index 5938b8da2b..85c5672c6c 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ChangeSubscriptionTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ChangeSubscriptionTest.java
@@ -17,6 +17,7 @@ import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.common.revision.CDORevision;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
import org.eclipse.emf.cdo.tests.model1.Category;
import org.eclipse.emf.cdo.tests.model1.Company;
import org.eclipse.emf.cdo.tests.model1.OrderDetail;
@@ -874,10 +875,9 @@ public class ChangeSubscriptionTest extends AbstractCDOTest
/**
* See bug 315409.
*/
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public void _testInvalidationWithDeltas_SubBranch() throws Exception
{
- skipUnlessBranching();
-
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CommitInfoTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CommitInfoTest.java
index 5fd41eb974..6d8a22dab6 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CommitInfoTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CommitInfoTest.java
@@ -23,6 +23,7 @@ import org.eclipse.emf.cdo.server.ITransaction;
import org.eclipse.emf.cdo.server.StoreThreadLocal;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.spi.server.InternalSession;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
import org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig;
import org.eclipse.emf.cdo.tests.config.impl.SessionConfig;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
@@ -73,10 +74,9 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(transaction.getBranch(), commitInfo.getBranch());
}
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public void testLocalSubBranch() throws Exception
{
- skipUnlessBranching();
-
CDOSession session = openSession();
CDOBranch branch = session.getBranchManager().getMainBranch().createBranch("sub");
CDOTransaction transaction = session.openTransaction(branch);
@@ -122,11 +122,10 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(comment, commitInfo.getComment());
}
+ @Skips("MongoDB")
@CleanRepositoriesBefore
public void testServerTimestamp() throws Exception
{
- skipMongo();
-
CDOSession session = openSession();
InternalSession serverSession = getRepository().getSessionManager().getSession(session.getSessionID());
StoreThreadLocal.setSession(serverSession);
@@ -146,11 +145,10 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getTimeStamp(), infos.get(1).getTimeStamp());
}
+ @Skips("MongoDB")
@CleanRepositoriesBefore
public void testServerBranch() throws Exception
{
- skipMongo();
-
CDOSession session = openSession();
StoreThreadLocal.setSession(getRepository().getSessionManager().getSession(session.getSessionID()));
@@ -170,11 +168,10 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getBranch(), infos.get(1).getBranch());
}
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
@CleanRepositoriesBefore
public void testServerSubBranch() throws Exception
{
- skipUnlessBranching();
-
CDOSession session = openSession();
StoreThreadLocal.setSession(getRepository().getSessionManager().getSession(session.getSessionID()));
@@ -194,11 +191,10 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getBranch(), infos.get(1).getBranch());
}
+ @Skips("MongoDB")
@CleanRepositoriesBefore
public void testServerUser() throws Exception
{
- skipMongo();
-
UserManager userManager = new UserManager();
userManager.activate();
userManager.addUser(USER_ID, PASSWORD);
@@ -227,11 +223,10 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getUserID(), infos.get(1).getUserID());
}
+ @Skips("MongoDB")
@CleanRepositoriesBefore
public void testServerComment() throws Exception
{
- skipMongo();
-
CDOSession session = openSession();
StoreThreadLocal.setSession(getRepository().getSessionManager().getSession(session.getSessionID()));
@@ -253,11 +248,10 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getComment(), infos.get(1).getComment());
}
+ @Skips("MongoDB")
@CleanRepositoriesBefore
public void testServerTimestampWithBranch() throws Exception
{
- skipMongo();
-
CDOSession session = openSession();
StoreThreadLocal.setSession(getRepository().getSessionManager().getSession(session.getSessionID()));
@@ -277,11 +271,10 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getTimeStamp(), infos.get(1).getTimeStamp());
}
+ @Skips("MongoDB")
@CleanRepositoriesBefore
public void testServerBranchWithBranch() throws Exception
{
- skipMongo();
-
CDOSession session = openSession();
StoreThreadLocal.setSession(getRepository().getSessionManager().getSession(session.getSessionID()));
@@ -301,10 +294,9 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getBranch(), infos.get(1).getBranch());
}
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public void testServerSubBranchWithBranch() throws Exception
{
- skipUnlessBranching();
-
CDOSession session = openSession();
StoreThreadLocal.setSession(getRepository().getSessionManager().getSession(session.getSessionID()));
@@ -325,11 +317,10 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getBranch(), infos.get(0).getBranch());
}
+ @Skips("MongoDB")
@CleanRepositoriesBefore
public void testServerUserWithBranch() throws Exception
{
- skipMongo();
-
UserManager userManager = new UserManager();
userManager.activate();
userManager.addUser(USER_ID, PASSWORD);
@@ -359,11 +350,10 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getUserID(), infos.get(1).getUserID());
}
+ @Skips("MongoDB")
@CleanRepositoriesBefore
public void testServerCommentWithBranch() throws Exception
{
- skipMongo();
-
CDOSession session = openSession();
StoreThreadLocal.setSession(getRepository().getSessionManager().getSession(session.getSessionID()));
@@ -386,10 +376,9 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getComment(), infos.get(1).getComment());
}
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public void testServerTimestampWithWrongBranch() throws Exception
{
- skipUnlessBranching();
-
CDOSession session = openSession();
StoreThreadLocal.setSession(getRepository().getSessionManager().getSession(session.getSessionID()));
@@ -408,10 +397,9 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(0, infos.size());
}
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public void testServerBranchWithWrongBranch() throws Exception
{
- skipUnlessBranching();
-
CDOSession session = openSession();
StoreThreadLocal.setSession(getRepository().getSessionManager().getSession(session.getSessionID()));
@@ -430,10 +418,9 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(0, infos.size());
}
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public void testServerSubBranchWithWrongBranch() throws Exception
{
- skipUnlessBranching();
-
CDOSession session = openSession();
StoreThreadLocal.setSession(getRepository().getSessionManager().getSession(session.getSessionID()));
@@ -453,10 +440,9 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(0, infos.size());
}
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public void testServerUserWithWrongBranch() throws Exception
{
- skipUnlessBranching();
-
UserManager userManager = new UserManager();
userManager.activate();
userManager.addUser(USER_ID, PASSWORD);
@@ -485,10 +471,9 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(0, infos.size());
}
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public void testServerCommentWithWrongBranch() throws Exception
{
- skipUnlessBranching();
-
CDOSession session = openSession();
StoreThreadLocal.setSession(getRepository().getSessionManager().getSession(session.getSessionID()));
@@ -548,11 +533,10 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getBranch(), infos.get(1).getBranch());
}
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
@CleanRepositoriesBefore
public void testClientSubBranch() throws Exception
{
- skipUnlessBranching();
-
CDOSession session = openSession();
CDOBranch branch = session.getBranchManager().getMainBranch().createBranch("sub");
CDOTransaction transaction = session.openTransaction(branch);
@@ -659,10 +643,9 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getBranch(), infos.get(1).getBranch());
}
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public void testClientSubBranchWithBranch() throws Exception
{
- skipUnlessBranching();
-
CDOSession session = openSession();
CDOBranch branch = session.getBranchManager().getMainBranch().createBranch("sub");
CDOTransaction transaction = session.openTransaction(branch);
@@ -731,10 +714,9 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getComment(), infos.get(1).getComment());
}
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public void testClientTimestampWithWrongBranch() throws Exception
{
- skipUnlessBranching();
-
CDOSession session = openSession();
CDOBranch wrong = session.getBranchManager().getMainBranch().createBranch("wrong");
CDOTransaction transaction = session.openTransaction();
@@ -751,10 +733,9 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(0, infos.size());
}
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public void testClientBranchWithWrongBranch() throws Exception
{
- skipUnlessBranching();
-
CDOSession session = openSession();
CDOBranch wrong = session.getBranchManager().getMainBranch().createBranch("wrong");
CDOTransaction transaction = session.openTransaction();
@@ -771,10 +752,9 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(0, infos.size());
}
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public void testClientSubBranchWithWrongBranch() throws Exception
{
- skipUnlessBranching();
-
CDOSession session = openSession();
CDOBranch wrong = session.getBranchManager().getMainBranch().createBranch("wrong");
CDOBranch branch = session.getBranchManager().getMainBranch().createBranch("sub");
@@ -792,10 +772,9 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(0, infos.size());
}
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public void testClientUserWithWrongBranch() throws Exception
{
- skipUnlessBranching();
-
UserManager userManager = new UserManager();
userManager.activate();
userManager.addUser(USER_ID, PASSWORD);
@@ -822,10 +801,9 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(0, infos.size());
}
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public void testClientCommentWithWrongBranch() throws Exception
{
- skipUnlessBranching();
-
CDOSession session = openSession();
CDOBranch wrong = session.getBranchManager().getMainBranch().createBranch("wrong");
CDOTransaction transaction = session.openTransaction();
@@ -874,10 +852,9 @@ public class CommitInfoTest extends AbstractCDOTest
}
}
+ @Requires(IRepositoryConfig.CAPABILITY_AUDITING)
public void testLogThroughClient() throws Exception
{
- skipUnlessAuditing();
-
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
@@ -899,10 +876,9 @@ public class CommitInfoTest extends AbstractCDOTest
System.out.println(baos.toString());
}
+ @Requires(IRepositoryConfig.CAPABILITY_AUDITING)
public void testLogThroughWriteAccessHandler() throws Exception
{
- skipUnlessAuditing();
-
ByteArrayOutputStream baos = new ByteArrayOutputStream();
final TextCommitInfoLog log = new TextCommitInfoLog(baos);
@@ -935,10 +911,9 @@ public class CommitInfoTest extends AbstractCDOTest
System.out.println(baos.toString());
}
+ @Requires(IRepositoryConfig.CAPABILITY_AUDITING)
public void testLogThroughCommitInfoHandler() throws Exception
{
- skipUnlessAuditing();
-
ByteArrayOutputStream baos = new ByteArrayOutputStream();
getRepository().addCommitInfoHandler(new TextCommitInfoLog(baos));
@@ -957,10 +932,9 @@ public class CommitInfoTest extends AbstractCDOTest
System.out.println(baos.toString());
}
+ @Requires(IRepositoryConfig.CAPABILITY_AUDITING)
public void testLogAsync() throws Exception
{
- skipUnlessAuditing();
-
ByteArrayOutputStream baos = new ByteArrayOutputStream();
AsyncCommitInfoHandler log = new AsyncCommitInfoHandler(new TextCommitInfoLog(baos));
log.activate();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CompareTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CompareTest.java
index cfba9ec2d2..726af1dead 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CompareTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CompareTest.java
@@ -15,6 +15,8 @@ import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
import org.eclipse.emf.cdo.common.commit.CDOChangeSetData;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.Requires;
import org.eclipse.emf.cdo.tests.model1.Company;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.view.CDOView;
@@ -25,19 +27,12 @@ import org.eclipse.emf.ecore.EObject;
/**
* @author Eike Stepper
*/
+@Requires(IRepositoryConfig.CAPABILITY_AUDITING)
public class CompareTest extends AbstractCDOTest
{
- @Override
- protected void doSetUp() throws Exception
- {
- super.doSetUp();
- skipUnlessAuditing();
- }
-
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public void testFromEmptyBranches() throws Exception
{
- skipUnlessBranching();
-
CDOSession session = openSession();
((org.eclipse.emf.cdo.net4j.CDONet4jSession)session).options().getProtocol().setTimeout(1000000000);
@@ -78,10 +73,9 @@ public class CompareTest extends AbstractCDOTest
assertCompare(session, mainBranch.getHead(), mainBranch.getPoint(time3), 0, 0, 0);
}
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public void testFromBranchWithAdditions() throws Exception
{
- skipUnlessBranching();
-
CDOSession session = openSession();
CDOBranch mainBranch = session.getBranchManager().getMainBranch();
CDOTransaction transaction = session.openTransaction(mainBranch);
@@ -121,10 +115,9 @@ public class CompareTest extends AbstractCDOTest
assertCompare(session, mainBranch.getHead(), source1.getHead(), 7, 1, 2);
}
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public void testAdditionsInSourceAndTarget() throws Exception
{
- skipUnlessBranching();
-
CDOSession session = openSession();
CDOBranch mainBranch = session.getBranchManager().getMainBranch();
CDOTransaction transaction = session.openTransaction(mainBranch);
@@ -175,10 +168,9 @@ public class CompareTest extends AbstractCDOTest
assertCompare(session, source1.getHead(), source2.getHead(), 2, 1, 5);
}
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public void testFromBranchWithChangesInSource() throws Exception
{
- skipUnlessBranching();
-
CDOSession session = openSession();
CDOBranch mainBranch = session.getBranchManager().getMainBranch();
CDOTransaction transaction = session.openTransaction(mainBranch);
@@ -206,10 +198,9 @@ public class CompareTest extends AbstractCDOTest
assertCompare(session, mainBranch.getHead(), source.getHead(), 0, 3, 0);
}
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public void testFromBranchWithRemovalsInSource() throws Exception
{
- skipUnlessBranching();
-
CDOSession session = openSession();
CDOBranch mainBranch = session.getBranchManager().getMainBranch();
CDOTransaction transaction = session.openTransaction(mainBranch);
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ConflictResolverTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ConflictResolverTest.java
index 45ad26e667..7c517d4914 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ConflictResolverTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ConflictResolverTest.java
@@ -12,6 +12,7 @@
package org.eclipse.emf.cdo.tests;
import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.tests.config.IModelConfig;
import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.CleanRepositoriesBefore;
import org.eclipse.emf.cdo.tests.model1.Address;
import org.eclipse.emf.cdo.transaction.CDOConflictResolver;
@@ -57,11 +58,10 @@ public class ConflictResolverTest extends AbstractCDOTest
transaction2.commit();
}
+ // Does not work in legacy as long as there is not getter interception
+ @Skips(IModelConfig.CAPABILITY_LEGACY)
public void testMergeLocalChangesPerFeature_BasicException() throws Exception
{
- // Does not work in legacy as long as there is not getter interception
- skipConfig(LEGACY);
-
msg("Opening session");
CDOSession session = openSession();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CrossReferenceTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CrossReferenceTest.java
index be77f87904..4a45bf5c56 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CrossReferenceTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CrossReferenceTest.java
@@ -322,10 +322,10 @@ public class CrossReferenceTest extends AbstractCDOTest
transaction.commit();
}
+ @Skips("Hibernate")
public void testDetachXRefExternal() throws Exception
{
skipStoreWithoutExternalReferences();
- skipConfig("Hibernate");
Customer customer = getModel1Factory().createCustomer();
customer.setName("customer");
@@ -389,10 +389,10 @@ public class CrossReferenceTest extends AbstractCDOTest
assertEquals(false, id.isExternal());
}
+ @Skips("Hibernate")
public void testNewMakeExternal() throws Exception
{
skipStoreWithoutExternalReferences();
- skipConfig("Hibernate");
Customer customer = getModel1Factory().createCustomer();
customer.setName("customer");
@@ -451,10 +451,10 @@ public class CrossReferenceTest extends AbstractCDOTest
assertEquals(false, id.isExternal());
}
+ @Skips("Hibernate")
public void testExternalMakeDangling() throws Exception
{
skipStoreWithoutExternalReferences();
- skipConfig("Hibernate");
Customer customer = getModel1Factory().createCustomer();
customer.setName("customer");
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ExternalReferenceTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ExternalReferenceTest.java
index 45bce75944..255df52550 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ExternalReferenceTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ExternalReferenceTest.java
@@ -17,6 +17,7 @@ import org.eclipse.emf.cdo.common.revision.CDORevisionData;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.internal.net4j.protocol.LoadRevisionsRequest;
import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.tests.config.IModelConfig;
import org.eclipse.emf.cdo.tests.model1.Company;
import org.eclipse.emf.cdo.tests.model1.PurchaseOrder;
import org.eclipse.emf.cdo.tests.model1.Supplier;
@@ -161,6 +162,8 @@ public class ExternalReferenceTest extends AbstractCDOTest
}
}
+ // XXX disabled because of Bug 290097
+ @Skips("Postgresql")
public void testOneXMIResourceManyViewsOnOneResourceSet() throws Exception
{
skipStoreWithoutExternalReferences();
@@ -269,10 +272,11 @@ public class ExternalReferenceTest extends AbstractCDOTest
}
}
+ // Skip this test until the problems with XATransactions are solved.
+ // XXX disabled because of Bug 290097
+ @Skips({ IModelConfig.CAPABILITY_LEGACY, "Postgresql" })
public void testManyViewsOnOneResourceSet() throws Exception
{
- // Skip this test until the problems with XATransactions are solved.
- skipConfig(LEGACY);
skipStoreWithoutExternalReferences();
getRepository(REPOSITORY_B_NAME);
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/FeatureMapTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/FeatureMapTest.java
index 1fc760a313..efdfa2f04f 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/FeatureMapTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/FeatureMapTest.java
@@ -181,6 +181,7 @@ public class FeatureMapTest extends AbstractCDOTest
assertEquals(ref2, fmDb.getEStructuralFeature(7));
}
+ @Skips("Postgresql")
public void testFeatureMaps() throws Exception
{
skipStoreWithoutFeatureMaps();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingManagerRestartRepositoryTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingManagerRestartRepositoryTest.java
index 318e281624..d8a4497b3a 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingManagerRestartRepositoryTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingManagerRestartRepositoryTest.java
@@ -10,19 +10,16 @@
*/
package org.eclipse.emf.cdo.tests;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.Requires;
+
/**
* @author Eike Stepper
*/
+@Requires(IRepositoryConfig.CAPABILITY_RESTARTABLE)
public class LockingManagerRestartRepositoryTest extends LockingManagerRestartSessionTest
{
@Override
- protected void doSetUp() throws Exception
- {
- super.doSetUp();
- skipMEM();
- }
-
- @Override
protected void doBetweenSessionCloseAndOpen()
{
restartRepository();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingNotificationsTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingNotificationsTest.java
index 29f83127df..424762bb4d 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingNotificationsTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingNotificationsTest.java
@@ -20,6 +20,7 @@ import org.eclipse.emf.cdo.common.lock.CDOLockUtil;
import org.eclipse.emf.cdo.common.revision.CDOIDAndBranch;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
import org.eclipse.emf.cdo.tests.model1.Company;
import org.eclipse.emf.cdo.tests.util.TestListener2;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
@@ -58,10 +59,9 @@ public class LockingNotificationsTest extends AbstractLockingTest
session1.close();
}
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public void testDifferentBranchDifferentSession() throws CommitException
{
- skipUnlessBranching();
-
CDOSession session1 = openSession();
CDOBranch subBranch = session1.getBranchManager().getMainBranch().createBranch("sub1");
CDOSession session2 = openSession();
@@ -71,10 +71,9 @@ public class LockingNotificationsTest extends AbstractLockingTest
session2.close();
}
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public void testDifferentBranchSameSession() throws CommitException
{
- skipUnlessBranching();
-
CDOSession session1 = openSession();
CDOBranch subBranch = session1.getBranchManager().getMainBranch().createBranch("sub2");
CDOView controlView = openViewWithLockNotifications(session1, subBranch);
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/MEMStoreQueryTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/MEMStoreQueryTest.java
index 3924d5b26b..491ed03d04 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/MEMStoreQueryTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/MEMStoreQueryTest.java
@@ -13,6 +13,7 @@ package org.eclipse.emf.cdo.tests;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.Requires;
import org.eclipse.emf.cdo.tests.model1.Category;
import org.eclipse.emf.cdo.tests.model1.Company;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
@@ -31,12 +32,11 @@ import java.util.Set;
/**
* @author Simon McDuff
*/
+@Requires("MEM")
public class MEMStoreQueryTest extends AbstractCDOTest
{
public void testMEMStoreBasicQuery() throws Exception
{
- skipUnlessMEM();
-
Set<Object> objects = new HashSet<Object>();
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
@@ -71,8 +71,6 @@ public class MEMStoreQueryTest extends AbstractCDOTest
public void testMEMStoreBasicQuery_EClassParameter() throws Exception
{
- skipUnlessConfig(MEM);
-
Set<Object> objects = new HashSet<Object>();
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
@@ -106,8 +104,6 @@ public class MEMStoreQueryTest extends AbstractCDOTest
public void testMEMStoreQueryCancel_successful() throws Exception
{
- skipUnlessConfig(MEM);
-
CDOTransaction transaction = initialize(500);
CDOQuery query = transaction.createQuery("TEST", "QUERYSTRING");
query.setParameter("sleep", 1000L);
@@ -130,8 +126,6 @@ public class MEMStoreQueryTest extends AbstractCDOTest
public void testMEMStoreQueryCancel_ViewClose() throws Exception
{
- skipUnlessConfig(MEM);
-
CDOTransaction transaction = initialize(500);
CDOQuery query = transaction.createQuery("TEST", "QUERYSTRING");
query.setParameter("sleep", 1000L);
@@ -152,8 +146,6 @@ public class MEMStoreQueryTest extends AbstractCDOTest
public void testMEMStoreQueryCancel_SessionClose() throws Exception
{
- skipUnlessConfig(MEM);
-
CDOTransaction transaction = initialize(500);
CDOQuery query = transaction.createQuery("TEST", "QUERYSTRING");
query.setParameter("sleep", 1000L);
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/MergingTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/MergingTest.java
index 08c41e8019..e31304de03 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/MergingTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/MergingTest.java
@@ -17,6 +17,8 @@ import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
import org.eclipse.emf.cdo.common.revision.CDORevision;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.Requires;
import org.eclipse.emf.cdo.tests.model1.Company;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.util.CDOUtil;
@@ -29,15 +31,9 @@ import org.eclipse.emf.spi.cdo.DefaultCDOMerger;
/**
* @author Eike Stepper
*/
+@Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public class MergingTest extends AbstractCDOTest
{
- @Override
- protected void doSetUp() throws Exception
- {
- super.doSetUp();
- skipUnlessBranching();
- }
-
public void testFromEmptyBranches() throws Exception
{
CDOSession session = openSession();
@@ -422,7 +418,7 @@ public class MergingTest extends AbstractCDOTest
CDOBranch mainBranch = session.getBranchManager().getMainBranch();
CDOTransaction transaction = session.openTransaction(mainBranch);
- CDOResource resource = transaction.createResource(getResourcePath(("/res" + run)));
+ CDOResource resource = transaction.createResource(getResourcePath("/res" + run));
EList<EObject> contents = resource.getContents();
addCompany(contents);
addCompany(contents);
@@ -638,11 +634,9 @@ public class MergingTest extends AbstractCDOTest
/**
* Bug 309467.
*/
- @SuppressWarnings("unused")
+ @Requires(IRepositoryConfig.CAPABILITY_RESTARTABLE)
public void test_Bugzilla_309467_ServerRestart() throws Exception
{
- skipMEM();
-
{
CDOSession session = openSession();
CDOBranch mainBranch = session.getBranchManager().getMainBranch();
@@ -650,11 +644,11 @@ public class MergingTest extends AbstractCDOTest
CDOResource resource = transaction.createResource(getResourcePath("/res"));
EList<EObject> contents = resource.getContents();
- Company company0 = addCompany(contents);
- Company company1 = addCompany(contents);
- Company company2 = addCompany(contents);
- Company company3 = addCompany(contents);
- Company company4 = addCompany(contents);
+ addCompany(contents);
+ addCompany(contents);
+ addCompany(contents);
+ addCompany(contents);
+ addCompany(contents);
long time1 = transaction.commit().getTimeStamp();
CDOBranch source1 = mainBranch.createBranch("source1", time1);
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RepositoryTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RepositoryTest.java
index fe61b83cc5..5987b3f18e 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RepositoryTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RepositoryTest.java
@@ -22,6 +22,7 @@ import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.spi.server.InternalRepository;
import org.eclipse.emf.cdo.spi.server.InternalStore;
import org.eclipse.emf.cdo.spi.server.ObjectWriteAccessHandler;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
import org.eclipse.emf.cdo.tests.model1.Customer;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.util.CDOUtil;
@@ -129,13 +130,12 @@ public class RepositoryTest extends AbstractCDOTest
/**
* See bug 329254
*/
+ @Requires(IRepositoryConfig.CAPABILITY_RESTARTABLE)
+ // hibernate will recreate the systeminfo table at repository
+ // restart (this is due to test settings)
+ @Skips("Hibernate")
public void testLastCommitTime() throws Exception
{
- skipMEM();
- // hibernate will recreate the systeminfo table at repository
- // restart (this is due to test settings)
- skipHibernate();
-
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
CDOResource resource = transaction.createResource(getResourcePath("/res1"));
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionDeltaCascadingBranchesTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionDeltaCascadingBranchesTest.java
index 04c44eba51..064c824e50 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionDeltaCascadingBranchesTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionDeltaCascadingBranchesTest.java
@@ -14,6 +14,8 @@ import org.eclipse.emf.cdo.common.branch.CDOBranch;
import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.Requires;
import org.eclipse.emf.cdo.tests.model1.Company;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.util.CommitException;
@@ -27,16 +29,10 @@ import org.eclipse.emf.common.util.EList;
/**
* @author Eike Stepper
*/
+@Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public class RevisionDeltaCascadingBranchesTest extends RevisionDeltaTest
{
@Override
- protected void doSetUp() throws Exception
- {
- super.doSetUp();
- skipUnlessBranching();
- }
-
- @Override
protected void testStoreDelta(ListManipulator manipulator)
{
BasicEList<Company> referenceSubSub = new BasicEList<Company>();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionDeltaInBranchTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionDeltaInBranchTest.java
index dd7c9e3f9c..698ef5ff94 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionDeltaInBranchTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionDeltaInBranchTest.java
@@ -14,6 +14,8 @@ import org.eclipse.emf.cdo.common.branch.CDOBranch;
import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.Requires;
import org.eclipse.emf.cdo.tests.model1.Company;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.util.CommitException;
@@ -27,16 +29,10 @@ import org.eclipse.emf.common.util.EList;
/**
* @author Eike Stepper
*/
+@Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public class RevisionDeltaInBranchTest extends RevisionDeltaTest
{
@Override
- protected void doSetUp() throws Exception
- {
- super.doSetUp();
- skipUnlessBranching();
- }
-
- @Override
protected void testStoreDelta(ListManipulator manipulator)
{
BasicEList<Company> referenceSub = new BasicEList<Company>();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionManagerTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionManagerTest.java
index a74960780b..42dadbc262 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionManagerTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionManagerTest.java
@@ -26,6 +26,8 @@ import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevisionManager;
import org.eclipse.emf.cdo.spi.server.InternalRepository;
import org.eclipse.emf.cdo.spi.server.InternalSession;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.Requires;
import org.eclipse.emf.cdo.tests.util.TestRevisionManager;
import org.eclipse.net4j.util.ReflectUtil;
@@ -41,6 +43,7 @@ import java.util.Map;
/**
* @author Eike Stepper
*/
+@Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public class RevisionManagerTest extends AbstractCDOTest
{
private static final CDOID ID = CDOIDUtil.createLong(2);
@@ -92,8 +95,7 @@ public class RevisionManagerTest extends AbstractCDOTest
protected void doSetUp() throws Exception
{
super.doSetUp();
- skipUnlessBranching();
- skipUnlessMEM();
+ // skipUnlessMEM();
Field disableGC = ReflectUtil.getField(AbstractCDORevisionCache.class, "disableGC");
ReflectUtil.setValue(disableGC, null, true);
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/StateMachineTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/StateMachineTest.java
index 9a9245385a..896363b58c 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/StateMachineTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/StateMachineTest.java
@@ -18,7 +18,8 @@ import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.internal.common.branch.CDOBranchImpl;
import org.eclipse.emf.cdo.session.CDOSession;
-import org.eclipse.emf.cdo.tests.config.impl.SessionConfig.Net4j;
+import org.eclipse.emf.cdo.tests.config.ISessionConfig;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.Requires;
import org.eclipse.emf.cdo.tests.model1.Category;
import org.eclipse.emf.cdo.tests.model1.Product1;
import org.eclipse.emf.cdo.tests.model1.Supplier;
@@ -40,6 +41,7 @@ import java.lang.reflect.Method;
/**
* @author Eike Stepper
*/
+@Requires(ISessionConfig.CAPABILITY_NET4J_JVM)
public class StateMachineTest extends AbstractCDOTest
{
private static final long TIMESTAMP = 12345678;
@@ -411,151 +413,6 @@ public class StateMachineTest extends AbstractCDOTest
{
}
- // // ///////////////////////////////////////////////////
- //
- // public void test_CLEAN_with_ATTACH() throws Exception
- // {
- // }
- //
- // public void test_CLEAN_with_DETACH() throws Exception
- // {
- // }
- //
- // public void test_CLEAN_with_READ() throws Exception
- // {
- // }
- //
- // public void test_CLEAN_with_WRITE() throws Exception
- // {
- // }
- //
- // public void test_CLEAN_with_INVALIDATE() throws Exception
- // {
- // }
- //
- // public void test_CLEAN_with_RELOAD() throws Exception
- // {
- // }
- //
- // public void test_CLEAN_with_COMMIT() throws Exception
- // {
- // }
- //
- // public void test_CLEAN_with_ROLLBACK() throws Exception
- // {
- // }
- //
- // // ///////////////////////////////////////////////////
- //
- // public void test_DIRTY_with_ATTACH() throws Exception
- // {
- // }
- //
- // public void test_DIRTY_with_DETACH() throws Exception
- // {
- // }
- //
- // public void test_DIRTY_with_READ() throws Exception
- // {
- // }
- //
- // public void test_DIRTY_with_WRITE() throws Exception
- // {
- // }
- //
- // public void test_DIRTY_with_INVALIDATE() throws Exception
- // {
- // }
- //
- // public void test_DIRTY_with_RELOAD() throws Exception
- // {
- // }
- //
- // public void test_DIRTY_with_COMMIT() throws Exception
- // {
- // }
- //
- // public void test_DIRTY_with_ROLLBACK() throws Exception
- // {
- // }
- //
- // // ///////////////////////////////////////////////////
- //
- // public void test_PROXY_with_ATTACH() throws Exception
- // {
- // }
- //
- // public void test_PROXY_with_DETACH() throws Exception
- // {
- // }
- //
- // public void test_PROXY_with_READ() throws Exception
- // {
- // }
- //
- // public void test_PROXY_with_WRITE() throws Exception
- // {
- // }
- //
- // public void test_PROXY_with_INVALIDATE() throws Exception
- // {
- // }
- //
- // public void test_PROXY_with_RELOAD() throws Exception
- // {
- // }
- //
- // public void test_PROXY_with_COMMIT() throws Exception
- // {
- // }
- //
- // public void test_PROXY_with_ROLLBACK() throws Exception
- // {
- // }
- //
- // // ///////////////////////////////////////////////////
- //
- // public void test_CONFLICT_with_ATTACH() throws Exception
- // {
- // }
- //
- // public void test_CONFLICT_with_DETACH() throws Exception
- // {
- // }
- //
- // public void test_CONFLICT_with_READ() throws Exception
- // {
- // }
- //
- // public void test_CONFLICT_with_WRITE() throws Exception
- // {
- // }
- //
- // public void test_CONFLICT_with_INVALIDATE() throws Exception
- // {
- // }
- //
- // public void test_CONFLICT_with_RELOAD() throws Exception
- // {
- // }
- //
- // public void test_CONFLICT_with_COMMIT() throws Exception
- // {
- // }
- //
- // public void test_CONFLICT_with_ROLLBACK() throws Exception
- // {
- // }
-
- // ///////////////////////////////////////////////////
-
- @Override
- protected void doSetUp() throws Exception
- {
- skipUnlessConfig(Net4j.JVM.INSTANCE);
- super.doSetUp();
- }
-
private static void assertFailure(IllegalStateException ex)
{
IOUtil.print(ex);
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/StickyViewsTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/StickyViewsTest.java
index ff4ceabe3f..fa09a3c088 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/StickyViewsTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/StickyViewsTest.java
@@ -17,6 +17,7 @@ import org.eclipse.emf.cdo.server.IRepository;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevisionManager;
import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.Requires;
import org.eclipse.emf.cdo.tests.model1.Category;
import org.eclipse.emf.cdo.tests.model1.Company;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
@@ -29,17 +30,13 @@ import org.eclipse.emf.common.util.EList;
/**
* @author Caspar De Groot
*/
+// Sticky behavior is only enabled when store supports auditing, so these tests are
+// meaningless and/or guaranteed to fail if this is not the case
+@Requires(IRepositoryConfig.CAPABILITY_AUDITING)
public class StickyViewsTest extends AbstractCDOTest
{
private static final int N_CATEGORIES = 3;
- private void checkSkip()
- {
- // Sticky behavior is only enabled when store supports auditing, so these tests are
- // meaningless and/or guaranteed to fail if this is not the case
- skipUnlessAuditing();
- }
-
public void test_removeLast() throws CommitException
{
test(new AbstractClosure()
@@ -81,8 +78,6 @@ public class StickyViewsTest extends AbstractCDOTest
private void test(Closure closure) throws CommitException
{
- checkSkip();
-
// Create a company with N categories
Company company1 = getModel1Factory().createCompany();
company1.setName("company");
@@ -134,8 +129,6 @@ public class StickyViewsTest extends AbstractCDOTest
*/
public void test_newCommittedObject() throws CommitException
{
- checkSkip();
-
CDOSession session = openSession();
session.options().setPassiveUpdateEnabled(false);
@@ -178,8 +171,6 @@ public class StickyViewsTest extends AbstractCDOTest
*/
public void test_dirtyCommittedObject() throws CommitException
{
- checkSkip();
-
// Put a company in the repo
{
CDOSession sess = openSession();
@@ -229,8 +220,6 @@ public class StickyViewsTest extends AbstractCDOTest
*/
public void test_detachedCommittedObject() throws CommitException
{
- checkSkip();
-
// Put a company in the repo
{
CDOSession sess = openSession();
@@ -281,8 +270,6 @@ public class StickyViewsTest extends AbstractCDOTest
public void test_refresh() throws CommitException
{
- checkSkip();
-
CDOSession sess = openSession();
CDOTransaction tx = sess.openTransaction();
sess.options().setPassiveUpdateEnabled(false);
@@ -313,8 +300,6 @@ public class StickyViewsTest extends AbstractCDOTest
public void test_otherSessionCommittedLatest() throws CommitException
{
- checkSkip();
-
CDOSession sess = openSession();
CDOTransaction tx = sess.openTransaction();
sess.options().setPassiveUpdateEnabled(false);
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/WorkspaceTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/WorkspaceTest.java
index 06e354d551..7891409dcc 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/WorkspaceTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/WorkspaceTest.java
@@ -10,7 +10,6 @@
*/
package org.eclipse.emf.cdo.tests;
-import org.eclipse.emf.cdo.common.CDOCommonRepository.IDGenerationLocation;
import org.eclipse.emf.cdo.common.branch.CDOBranch;
import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
import org.eclipse.emf.cdo.common.commit.CDOChangeSetData;
@@ -27,6 +26,8 @@ import org.eclipse.emf.cdo.session.CDOSessionConfiguration;
import org.eclipse.emf.cdo.session.CDOSessionConfigurationFactory;
import org.eclipse.emf.cdo.spi.server.InternalRepository;
import org.eclipse.emf.cdo.spi.workspace.InternalCDOWorkspace;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.Requires;
import org.eclipse.emf.cdo.tests.model1.Customer;
import org.eclipse.emf.cdo.tests.model1.OrderDetail;
import org.eclipse.emf.cdo.tests.model1.Product1;
@@ -61,6 +62,7 @@ import java.util.Map;
/**
* @author Eike Stepper
*/
+@Requires(IRepositoryConfig.CAPABILITY_AUDITING)
public class WorkspaceTest extends AbstractCDOTest
{
private static final String RESOURCE = "/test1";
@@ -95,8 +97,6 @@ public class WorkspaceTest extends AbstractCDOTest
protected void doSetUp() throws Exception
{
super.doSetUp();
-
- skipUnlessAuditing();
skipStoreWithoutHandleRevisions();
CDOSession session = openSession();
@@ -193,10 +193,9 @@ public class WorkspaceTest extends AbstractCDOTest
}
}
+ @Requires(IRepositoryConfig.CAPABILITY_UUIDS)
public void testAddObjects() throws Exception
{
- skipTest(getRepository().getIDGenerationLocation() == IDGenerationLocation.STORE);
-
InternalCDOWorkspace workspace = checkout("MAIN", CDOBranchPoint.UNSPECIFIED_DATE);
CDOTransaction transaction = workspace.openTransaction();
@@ -320,10 +319,9 @@ public class WorkspaceTest extends AbstractCDOTest
}
}
+ @Requires(IRepositoryConfig.CAPABILITY_UUIDS)
public void testAddObjects2() throws Exception
{
- skipTest(getRepository().getIDGenerationLocation() == IDGenerationLocation.STORE);
-
InternalCDOWorkspace workspace = checkout("MAIN", CDOBranchPoint.UNSPECIFIED_DATE);
CDOTransaction transaction = workspace.openTransaction();
@@ -462,10 +460,9 @@ public class WorkspaceTest extends AbstractCDOTest
assertEquals(0, changes.getDetachedObjects().size());
}
+ @Requires(IRepositoryConfig.CAPABILITY_UUIDS)
public void testLocalChangesAfterAdd() throws Exception
{
- skipTest(getRepository().getIDGenerationLocation() == IDGenerationLocation.STORE);
-
InternalCDOWorkspace workspace = checkout("MAIN", CDOBranchPoint.UNSPECIFIED_DATE);
CDOTransaction transaction = workspace.openTransaction();
@@ -544,10 +541,9 @@ public class WorkspaceTest extends AbstractCDOTest
assertEquals(0, changes.getDetachedObjects().size());
}
+ @Requires(IRepositoryConfig.CAPABILITY_UUIDS)
public void testLocalChangesAfterAdd2() throws Exception
{
- skipTest(getRepository().getIDGenerationLocation() == IDGenerationLocation.STORE);
-
InternalCDOWorkspace workspace = checkout("MAIN", CDOBranchPoint.UNSPECIFIED_DATE);
CDOTransaction transaction = workspace.openTransaction();
@@ -643,10 +639,9 @@ public class WorkspaceTest extends AbstractCDOTest
assertEquals(info.getTimeStamp(), workspace.getTimeStamp());
}
+ @Requires(IRepositoryConfig.CAPABILITY_UUIDS)
public void testCheckinAfterAdd() throws Exception
{
- skipTest(getRepository().getIDGenerationLocation() == IDGenerationLocation.STORE);
-
InternalCDOWorkspace workspace = checkout("MAIN", CDOBranchPoint.UNSPECIFIED_DATE);
IOUtil.ERR().println("Checkout done");
@@ -741,10 +736,9 @@ public class WorkspaceTest extends AbstractCDOTest
assertEquals(info.getTimeStamp(), workspace.getTimeStamp());
}
+ @Requires(IRepositoryConfig.CAPABILITY_UUIDS)
public void testCheckinAfterAdd2() throws Exception
{
- skipTest(getRepository().getIDGenerationLocation() == IDGenerationLocation.STORE);
-
InternalCDOWorkspace workspace = checkout("MAIN", CDOBranchPoint.UNSPECIFIED_DATE);
CDOTransaction transaction = workspace.openTransaction();
@@ -873,10 +867,9 @@ public class WorkspaceTest extends AbstractCDOTest
assertEquals(info.getTimeStamp(), workspace.getTimeStamp());
}
+ @Requires(IRepositoryConfig.CAPABILITY_UUIDS)
public void testCheckin2AfterAdd() throws Exception
{
- skipTest(getRepository().getIDGenerationLocation() == IDGenerationLocation.STORE);
-
InternalCDOWorkspace workspace = checkout("MAIN", CDOBranchPoint.UNSPECIFIED_DATE);
CDOTransaction transaction = workspace.openTransaction();
@@ -1013,10 +1006,9 @@ public class WorkspaceTest extends AbstractCDOTest
assertEquals(totalObjects, dumpObjects(null, resource));
}
+ @Requires(IRepositoryConfig.CAPABILITY_UUIDS)
public void testUpdateAfterMasterAdd() throws Exception
{
- skipTest(getRepository().getIDGenerationLocation() == IDGenerationLocation.STORE);
-
InternalCDOWorkspace workspace = checkout("MAIN", CDOBranchPoint.UNSPECIFIED_DATE);
assertNotSame(CDOBranchPoint.UNSPECIFIED_DATE, workspace.getTimeStamp());
@@ -1110,10 +1102,9 @@ public class WorkspaceTest extends AbstractCDOTest
assertEquals(2, countModifiedProduct(view));
}
+ @Requires(IRepositoryConfig.CAPABILITY_UUIDS)
public void testUpdateAfterMasterAndLocalAdd() throws Exception
{
- skipTest(getRepository().getIDGenerationLocation() == IDGenerationLocation.STORE);
-
InternalCDOWorkspace workspace = checkout("MAIN", CDOBranchPoint.UNSPECIFIED_DATE);
assertNotSame(CDOBranchPoint.UNSPECIFIED_DATE, workspace.getTimeStamp());
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/XATransactionTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/XATransactionTest.java
index 440a8234ab..0df71205db 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/XATransactionTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/XATransactionTest.java
@@ -11,9 +11,10 @@
*/
package org.eclipse.emf.cdo.tests;
-import org.eclipse.emf.cdo.common.CDOCommonRepository.IDGenerationLocation;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.tests.config.IModelConfig;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
import org.eclipse.emf.cdo.tests.model1.PurchaseOrder;
import org.eclipse.emf.cdo.tests.model1.Supplier;
import org.eclipse.emf.cdo.tests.model2.SpecialPurchaseOrder;
@@ -143,6 +144,8 @@ public class XATransactionTest extends AbstractCDOTest
xaTransaction.commit();
}
+ // XXX disabled because of Bug 290097
+ @Skips("Postgresql")
public void testCommitFromTransactionDisabled() throws Exception
{
skipStoreWithoutExternalReferences();
@@ -189,12 +192,11 @@ public class XATransactionTest extends AbstractCDOTest
}
}
+ // Skip this test until the problems with XATransactions are solved.
+ @Skips({ IModelConfig.CAPABILITY_LEGACY, IRepositoryConfig.CAPABILITY_UUIDS, "DB" })
public void testNotUsingXATransaction_Exception() throws Exception
{
- // Skip this test until the problems with XATransactions are solved.
- skipConfig(LEGACY);
skipStoreWithoutExternalReferences();
- skipTest(getRepositoryConfig().getIDGenerationLocation() == IDGenerationLocation.CLIENT);
getRepository(REPOSITORY2_NAME);
{
@@ -235,6 +237,9 @@ public class XATransactionTest extends AbstractCDOTest
}
}
+ // XXX disabled because of Bug 290097
+ @Skips("Postgresql")
+ @CleanRepositoriesBefore
public void test_ExceptionInReadingStream() throws Exception
{
skipStoreWithoutExternalReferences();
@@ -280,11 +285,10 @@ public class XATransactionTest extends AbstractCDOTest
}
}
+ // Skip this test until the problems with XATransactions are solved.
+ @Skips(IModelConfig.CAPABILITY_LEGACY)
public void _test_ExceptionInWrite() throws Exception
{
- // Skip this test until the problems with XATransactions are solved.
- skipConfig(LEGACY);
-
getRepository(REPOSITORY2_NAME);
getRepository("repo3");
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_260756_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_260756_Test.java
index f49dcbd438..64045eb607 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_260756_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_260756_Test.java
@@ -33,10 +33,9 @@ public class Bugzilla_260756_Test extends AbstractCDOTest
{
private static final String LANGUAGE = "TEST";
+ @Requires("MEM")
public void testBugzilla_260756() throws Exception
{
- skipUnlessMEM();
-
Set<Object> objects = new HashSet<Object>();
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_279982_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_279982_Test.java
index cb0d7020f9..6676145bb1 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_279982_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_279982_Test.java
@@ -13,6 +13,7 @@ package org.eclipse.emf.cdo.tests.bugzilla;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.config.IModelConfig;
import org.eclipse.emf.cdo.tests.model4.GenRefMultiNonContained;
import org.eclipse.emf.cdo.tests.model4.GenRefSingleContained;
import org.eclipse.emf.cdo.tests.model4.GenRefSingleNonContained;
@@ -32,9 +33,10 @@ import org.eclipse.emf.ecore.EObject;
*/
public class Bugzilla_279982_Test extends AbstractCDOTest
{
+ // As log as there is no getter interception, stale reference cannot be detected for legacy
+ @Skips(IModelConfig.CAPABILITY_LEGACY)
public void testBugzilla_279982_Single() throws Exception
- {// as log as there is no getter interception, stale reference cannot be detected for legacy
- skipConfig(LEGACY);
+ {
CDOSession session = openSession();
CDOTransaction tx = session.openTransaction();
CDOResource res = tx.getOrCreateResource(getResourcePath("/resource1"));
@@ -98,9 +100,10 @@ public class Bugzilla_279982_Test extends AbstractCDOTest
assertNull(reference.getElement());
}
+ // As log as there is no getter interception, stale reference cannot be detected for legacy
+ @Skips(IModelConfig.CAPABILITY_LEGACY)
public void testBugzilla_279982_Multi() throws Exception
- {// as log as there is no getter interception, stale reference cannot be detected for legacy
- skipConfig(LEGACY);
+ {
CDOSession session = openSession();
CDOTransaction tx = session.openTransaction();
CDOResource res = tx.getOrCreateResource(getResourcePath("/resource1"));
@@ -148,9 +151,10 @@ public class Bugzilla_279982_Test extends AbstractCDOTest
assertEquals(0, reference.getElements().size());
}
+ // As log as there is no getter interception, stale reference cannot be detected for legacy
+ @Skips(IModelConfig.CAPABILITY_LEGACY)
public void testBugzilla_279982_Multi_RevisionPrefetchingPolicy() throws Exception
- {// as log as there is no getter interception, stale reference cannot be detected for legacy
- skipConfig(LEGACY);
+ {
CDOSession session = openSession();
{
CDOTransaction tx = session.openTransaction();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_283985_1_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_283985_1_Test.java
index 5337edaa66..848c58682b 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_283985_1_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_283985_1_Test.java
@@ -16,6 +16,7 @@ import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.config.IModelConfig;
import org.eclipse.emf.cdo.tests.model1.Model1Factory;
import org.eclipse.emf.cdo.tests.model1.Order;
import org.eclipse.emf.cdo.tests.model1.OrderDetail;
@@ -345,10 +346,10 @@ public class Bugzilla_283985_1_Test extends AbstractCDOTest
clearCache(getRepository().getRevisionManager());
}
+ // TODO Fix bug 344072
+ @Skips(IModelConfig.CAPABILITY_LEGACY)
public void testAddRemoveSequence() throws CommitException
{
- skipConfig(LEGACY); // TODO Fix bug 344072
-
CDOSession session = openSession();
CDOTransaction tx = session.openTransaction();
CDOResource r1 = tx.getOrCreateResource(getResourcePath("/r1"));
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_283985_3_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_283985_3_Test.java
index 97aecd4b3b..99cdc8019c 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_283985_3_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_283985_3_Test.java
@@ -15,6 +15,7 @@ import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.config.IModelConfig;
import org.eclipse.emf.cdo.tests.model1.Model1Factory;
import org.eclipse.emf.cdo.tests.model1.Order;
import org.eclipse.emf.cdo.tests.model1.OrderDetail;
@@ -75,10 +76,10 @@ public class Bugzilla_283985_3_Test extends AbstractCDOTest
super.tearDown();
}
+ // TODO Fix bug 344072
+ @Skips(IModelConfig.CAPABILITY_LEGACY)
public void test1() throws CommitException
{
- skipConfig(LEGACY); // TODO Fix bug 344072
-
CDOID id = CDOUtil.getCDOObject(detail1).cdoID();
order1.getOrderDetails().remove(detail1);
@@ -94,10 +95,10 @@ public class Bugzilla_283985_3_Test extends AbstractCDOTest
assertClean(detail1, transaction);
}
+ // TODO Fix bug 344072
+ @Skips(IModelConfig.CAPABILITY_LEGACY)
public void test2() throws CommitException
{
- skipConfig(LEGACY); // TODO Fix bug 344072
-
InternalCDOSavepoint sp = (InternalCDOSavepoint)transaction.setSavepoint();
order1.getOrderDetails().remove(detail1);
assertTransient(detail1);
@@ -119,10 +120,10 @@ public class Bugzilla_283985_3_Test extends AbstractCDOTest
assertEquals(false, order1.getOrderDetails().contains(detail1));
}
+ // TODO Fix bug 344072
+ @Skips(IModelConfig.CAPABILITY_LEGACY)
public void test3() throws CommitException
{
- skipConfig(LEGACY); // TODO Fix bug 344072
-
CDOID id = CDOUtil.getCDOObject(detail1).cdoID();
transaction.setSavepoint();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_303807_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_303807_Test.java
index 5323bbcae6..3fc271df8d 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_303807_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_303807_Test.java
@@ -14,6 +14,8 @@ package org.eclipse.emf.cdo.tests.bugzilla;
import org.eclipse.emf.cdo.common.branch.CDOBranch;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.Requires;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
/**
@@ -23,15 +25,9 @@ import org.eclipse.emf.cdo.transaction.CDOTransaction;
*
* @author Victor Roldan Betancort
*/
+@Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public class Bugzilla_303807_Test extends AbstractCDOTest
{
- @Override
- protected void doSetUp() throws Exception
- {
- super.doSetUp();
- skipUnlessBranching();
- }
-
public void testBugzilla_303807() throws Exception
{
CDOSession session = openSession();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_305527_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_305527_Test.java
index 32900b0b0f..d53b98847f 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_305527_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_305527_Test.java
@@ -13,6 +13,7 @@ package org.eclipse.emf.cdo.tests.bugzilla;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
import org.eclipse.emf.cdo.tests.mango.MangoValue;
import org.eclipse.emf.cdo.tests.mango.MangoValueList;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
@@ -25,9 +26,9 @@ import org.eclipse.emf.cdo.view.CDOView;
*/
public class Bugzilla_305527_Test extends AbstractCDOTest
{
+ @Requires(IRepositoryConfig.CAPABILITY_AUDITING)
public void testAvoidReferencingDifferentViews() throws CommitException
{
- skipUnlessAuditing();
final CDOSession session = openSession();
long commitTime;
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_306998_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_306998_Test.java
index b403af6d5d..05613eae25 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_306998_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_306998_Test.java
@@ -70,12 +70,11 @@ public class Bugzilla_306998_Test extends AbstractCDOTest
}
}
+ // does not affect MemStore!
+ @Skips("MEM")
@CleanRepositoriesBefore
public void testInalidEENumLiteral() throws CommitException
{
- // does not affect MemStore!
- skipMEM();
-
EPackage pkg = EMFUtil.createEPackage("pkg", "pkg", "http://cdo.eclipse.org/Bugzilla_306998_Test_1.ecore");
EClass cls = EMFUtil.createEClass(pkg, "cls", false, false);
EAttribute att = EMFUtil.createEAttribute(cls, "att", Model1Package.eINSTANCE.getVAT());
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_313326_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_313326_Test.java
index 84467c6c31..27e0ab1611 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_313326_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_313326_Test.java
@@ -14,6 +14,7 @@ import org.eclipse.emf.cdo.common.branch.CDOBranch;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
import org.eclipse.emf.cdo.tests.model4.RefSingleContained;
import org.eclipse.emf.cdo.tests.util.TestAdapter;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
@@ -28,11 +29,10 @@ import org.eclipse.emf.spi.cdo.DefaultCDOMerger;
*/
public class Bugzilla_313326_Test extends AbstractCDOTest
{
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
@CleanRepositoriesBefore
public void testNotificationBuilderBranch() throws Exception
{
- skipUnlessBranching();
-
// setup transaction.
final CDOSession session = openSession();
final CDOTransaction tr1 = session.openTransaction();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_314264_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_314264_Test.java
index a4bc33a1e0..c1bcc7ec64 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_314264_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_314264_Test.java
@@ -14,6 +14,7 @@ import org.eclipse.emf.cdo.common.branch.CDOBranch;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.CleanRepositoriesBefore;
import org.eclipse.emf.cdo.tests.model2.TaskContainer;
import org.eclipse.emf.cdo.tests.util.TestAdapter;
@@ -32,11 +33,10 @@ import org.eclipse.emf.spi.cdo.DefaultCDOMerger;
@CleanRepositoriesBefore
public class Bugzilla_314264_Test extends AbstractCDOTest
{
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
@CleanRepositoriesBefore
public void testMergeTest() throws Exception
{
- skipUnlessBranching();
-
// setup transaction.
final CDOSession session = openSession();
final CDOTransaction tr1 = session.openTransaction();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_315043_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_315043_Test.java
index 0833e760a6..4118f495c6 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_315043_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_315043_Test.java
@@ -21,6 +21,7 @@ import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.spi.common.revision.DetachedCDORevision;
import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
import org.eclipse.emf.cdo.tests.model1.Company;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.util.CDOUtil;
@@ -40,11 +41,10 @@ import java.util.Set;
*/
public class Bugzilla_315043_Test extends AbstractCDOTest
{
+ @Requires(IRepositoryConfig.CAPABILITY_AUDITING)
@CleanRepositoriesBefore
public void testReloadingRevisions() throws Exception
{
- skipUnlessAuditing();
-
final String RESOURCE_NAME = "resource";
Set<CDOID> ids = new HashSet<CDOID>();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_324084_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_324084_Test.java
index 4a60f8723e..5716af17b9 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_324084_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_324084_Test.java
@@ -16,6 +16,7 @@ import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.server.IRepository;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.CleanRepositoriesBefore;
import org.eclipse.emf.cdo.tests.model4.RefMultiContained;
import org.eclipse.emf.cdo.tests.model4.RefSingleContained;
@@ -44,10 +45,9 @@ public class Bugzilla_324084_Test extends AbstractCDOTest
return map;
}
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public void testXRefMergeSingleValueTest() throws Exception
{
- skipUnlessBranching();
-
// setup transaction.
final CDOSession session = openSession();
final CDOTransaction tr1 = session.openTransaction();
@@ -81,10 +81,9 @@ public class Bugzilla_324084_Test extends AbstractCDOTest
assertEquals(false, tr1.isDirty());
}
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public void testXRefMergeManyValueTest() throws Exception
{
- skipUnlessBranching();
-
// setup transaction.
final CDOSession session = openSession();
final CDOTransaction tr1 = session.openTransaction();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_324635_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_324635_Test.java
index b7b43fdd68..d1dcde83f8 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_324635_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_324635_Test.java
@@ -15,6 +15,7 @@ import org.eclipse.emf.cdo.common.branch.CDOBranch;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
import org.eclipse.emf.cdo.tests.model4.MultiContainedElement;
import org.eclipse.emf.cdo.tests.model4.RefMultiContained;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
@@ -32,10 +33,9 @@ import org.eclipse.emf.spi.cdo.DefaultCDOMerger;
*/
public class Bugzilla_324635_Test extends AbstractCDOTest
{
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public void testTargetGoalDeltaVersion() throws Exception
{
- skipUnlessBranching();
-
// setup 2 transactions.
final CDOSession session1 = openSession();
final CDOTransaction s1Tr1 = session1.openTransaction();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_324756_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_324756_Test.java
index 784e87e4db..8a9fc7204b 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_324756_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_324756_Test.java
@@ -15,6 +15,7 @@ import org.eclipse.emf.cdo.common.branch.CDOBranch;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
import org.eclipse.emf.cdo.tests.model4.ContainedElementNoOpposite;
import org.eclipse.emf.cdo.tests.model4.MultiContainedElement;
import org.eclipse.emf.cdo.tests.model4.RefMultiContained;
@@ -30,10 +31,9 @@ import org.eclipse.emf.cdo.view.CDOAdapterPolicy;
*/
public class Bugzilla_324756_Test extends AbstractCDOTest
{
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public void testReattachBranchVersion() throws Exception
{
- skipUnlessBranching();
-
// setup transaction.
final CDOSession session1 = openSession();
final CDOTransaction s1Tr1 = session1.openTransaction();
@@ -84,10 +84,9 @@ public class Bugzilla_324756_Test extends AbstractCDOTest
assertEquals(false, s1Tr3.isDirty());
}
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
public void testReattachBranchVersion2() throws Exception
{
- skipUnlessBranching();
-
// setup transaction.
final CDOSession session1 = openSession();
final CDOTransaction s1Tr1 = session1.openTransaction();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_325866_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_325866_Test.java
index 8998887df1..205f4d70bf 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_325866_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_325866_Test.java
@@ -16,6 +16,7 @@ import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.server.IRepository;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
import org.eclipse.emf.cdo.tests.model4.GenRefMultiContained;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.view.CDOAdapterPolicy;
@@ -42,11 +43,10 @@ public class Bugzilla_325866_Test extends AbstractCDOTest
return map;
}
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
@CleanRepositoriesBefore
public void testXRefReattachBranch() throws Exception
{
- skipUnlessBranching();
-
// setup transaction.
final CDOSession session1 = openSession();
final CDOTransaction s1Tr1 = session1.openTransaction();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_326518_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_326518_Test.java
index 1ce1567614..093864e9ef 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_326518_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_326518_Test.java
@@ -19,6 +19,7 @@ import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.server.IRepository;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
import org.eclipse.emf.cdo.tests.model4.ContainedElementNoOpposite;
import org.eclipse.emf.cdo.tests.model4.GenRefMultiContained;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
@@ -46,11 +47,10 @@ public class Bugzilla_326518_Test extends AbstractCDOTest
return map;
}
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
@CleanRepositoriesBefore
public void testIndexBranchMerge() throws Exception
{
- skipUnlessBranching();
-
// setup transaction.
final CDOSession session = openSession();
final CDOTransaction transaction1 = session.openTransaction();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_327604_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_327604_Test.java
index d2a843e572..6351330a74 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_327604_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_327604_Test.java
@@ -22,6 +22,8 @@ import org.eclipse.emf.cdo.session.CDOSessionConfigurationFactory;
import org.eclipse.emf.cdo.spi.server.InternalRepository;
import org.eclipse.emf.cdo.spi.workspace.InternalCDOWorkspace;
import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.Requires;
import org.eclipse.emf.cdo.tests.model1.Customer;
import org.eclipse.emf.cdo.tests.model1.OrderDetail;
import org.eclipse.emf.cdo.tests.model1.Product1;
@@ -54,6 +56,7 @@ import java.util.Map;
*
* @author Martin Fluegge
*/
+@Requires(IRepositoryConfig.CAPABILITY_AUDITING)
public class Bugzilla_327604_Test extends AbstractCDOTest
{
private static final String RESOURCE = "/test1";
@@ -97,7 +100,6 @@ public class Bugzilla_327604_Test extends AbstractCDOTest
{
disableConsole();
super.doSetUp();
- skipUnlessAuditing();
skipTest(!getRepository().getStore().getObjectIDTypes().equals(MEMStore.OBJECT_ID_TYPES));
CDOSession session = openSession();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_329753_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_329753_Test.java
index 567f7b2956..7c828d6199 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_329753_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_329753_Test.java
@@ -14,6 +14,7 @@ import org.eclipse.emf.cdo.CDOObject;
import org.eclipse.emf.cdo.common.revision.CDORevision;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.config.IModelConfig;
import org.eclipse.emf.cdo.tests.model1.OrderDetail;
import org.eclipse.emf.cdo.tests.model1.Product1;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
@@ -26,10 +27,9 @@ import org.eclipse.emf.ecore.resource.Resource;
*/
public class Bugzilla_329753_Test extends AbstractCDOTest
{
+ @Requires(IModelConfig.CAPABILITY_LEGACY)
public void testIncreasingVersion() throws Exception
{
- skipUnlessConfig(LEGACY);
-
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_330052_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_330052_Test.java
index aab6e937fa..83722f46c9 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_330052_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_330052_Test.java
@@ -15,6 +15,7 @@ import org.eclipse.emf.cdo.CDOObject;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
import org.eclipse.emf.cdo.tests.model1.Address;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.util.CDOUtil;
@@ -53,10 +54,9 @@ public class Bugzilla_330052_Test extends AbstractCDOTest
/**
* Tests whether an audit view in the same session fetches the correct historical version
*/
+ @Requires(IRepositoryConfig.CAPABILITY_AUDITING)
public void test_auditView() throws CommitException
{
- skipUnlessAuditing();
-
CDOSession session = openSession();
session.options().setPassiveUpdateEnabled(false);
CDOTransaction transaction = session.openTransaction();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_333299_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_333299_Test.java
index 19396a64c7..de33a190b6 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_333299_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_333299_Test.java
@@ -13,6 +13,7 @@ package org.eclipse.emf.cdo.tests.bugzilla;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.config.IModelConfig;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.util.CommitException;
@@ -26,10 +27,9 @@ import org.eclipse.emf.ecore.EcoreFactory;
*/
public class Bugzilla_333299_Test extends AbstractCDOTest
{
+ @Requires(IModelConfig.CAPABILITY_LEGACY)
public void testMoveEcoreElement() throws CommitException
{
- skipUnlessConfig(LEGACY);
-
{
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_336382_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_336382_Test.java
index 7506db2df7..0b28e1ef70 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_336382_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_336382_Test.java
@@ -14,6 +14,8 @@ import org.eclipse.emf.cdo.common.branch.CDOBranch;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.config.IModelConfig;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
import org.eclipse.emf.cdo.tests.model1.Company;
import org.eclipse.emf.cdo.transaction.CDOMerger;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
@@ -25,11 +27,10 @@ import org.eclipse.emf.spi.cdo.DefaultCDOMerger;
*/
public class Bugzilla_336382_Test extends AbstractCDOTest
{
+ @Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
+ @Skips(IModelConfig.CAPABILITY_LEGACY)
public void testPromoteToBranch() throws Exception
{
- skipUnlessBranching();
- skipConfig(LEGACY);
-
CDOSession session = openSession();
CDOBranch mainBranch = session.getBranchManager().getMainBranch();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_337054_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_337054_Test.java
index 720f9138c8..db56937f76 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_337054_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_337054_Test.java
@@ -14,6 +14,7 @@ import org.eclipse.emf.cdo.common.branch.CDOBranch;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
import org.eclipse.emf.cdo.tests.model1.Company;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.util.CDOUtil;
@@ -29,11 +30,9 @@ public class Bugzilla_337054_Test extends AbstractCDOTest
private int testedListSize = 3;
+ @Requires({ IRepositoryConfig.CAPABILITY_BRANCHING, IRepositoryConfig.CAPABILITY_RESTARTABLE })
public void testCDOElementProxies() throws Exception
{
- skipMEM();
- skipUnlessBranching();
-
CDOSession session = openSession();
session.options().setCollectionLoadingPolicy(CDOUtil.createCollectionLoadingPolicy(0, 300));
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_342135_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_342135_Test.java
index 42a322fd77..887f938aa1 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_342135_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_342135_Test.java
@@ -16,6 +16,7 @@ import org.eclipse.emf.cdo.common.revision.CDORevisionKey;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
import org.eclipse.emf.cdo.tests.model1.Company;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
@@ -31,10 +32,9 @@ import java.util.List;
*/
public class Bugzilla_342135_Test extends AbstractCDOTest
{
+ @Requires(IRepositoryConfig.CAPABILITY_AUDITING)
public void testDetachedCommitInfo() throws Exception
{
- skipUnlessAuditing();
-
// Create test resource
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_343471_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_343471_Test.java
index 37fc998bcf..731a099b33 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_343471_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_343471_Test.java
@@ -13,6 +13,7 @@ package org.eclipse.emf.cdo.tests.bugzilla;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.config.IModelConfig;
import org.eclipse.emf.cdo.tests.model1.Category;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.util.CommitException;
@@ -27,10 +28,9 @@ import java.util.Set;
*/
public class Bugzilla_343471_Test extends AbstractCDOTest
{
+ @Skips(IModelConfig.CAPABILITY_LEGACY)
public void test() throws CommitException
{
- skipLegacy();
-
CDOSession session = openSession();
CDOTransaction tx = session.openTransaction();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IConfig.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IConfig.java
index 41470dcfe8..b2e0a521ae 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IConfig.java
@@ -26,4 +26,6 @@ public interface IConfig extends ITestLifecycle, Serializable
public Object getTestProperty(String key);
public boolean isValid(Set<IConfig> configs);
+
+ public void initCapabilities(Set<String> capabilities);
}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IContainerConfig.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IContainerConfig.java
index 8c8118947e..3815e794f4 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IContainerConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IContainerConfig.java
@@ -17,6 +17,10 @@ import org.eclipse.net4j.util.container.IManagedContainer;
*/
public interface IContainerConfig extends IConfig
{
+ public static final String CAPABILITY_COMBINED = "containers.combined";
+
+ public static final String CAPABILITY_SEPARATED = "containers.separated";
+
public boolean hasClientContainer();
public boolean hasServerContainer();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IModelConfig.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IModelConfig.java
index d788f2105d..6010f3eece 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IModelConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IModelConfig.java
@@ -33,6 +33,10 @@ import org.eclipse.emf.cdo.tests.model6.Model6Package;
*/
public interface IModelConfig extends IConfig
{
+ public static final String CAPABILITY_NATIVE = "model.native";
+
+ public static final String CAPABILITY_LEGACY = "model.legacy";
+
public MangoFactory getMangoFactory();
public MangoPackage getMangoPackage();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IRepositoryConfig.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IRepositoryConfig.java
index dae56aceec..330e3503a3 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IRepositoryConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IRepositoryConfig.java
@@ -23,6 +23,16 @@ public interface IRepositoryConfig extends IConfig
{
public static final String REPOSITORY_NAME = "repo1";
+ public static final String CAPABILITY_AUDITING = "repository.auditing";
+
+ public static final String CAPABILITY_BRANCHING = "repository.branching";
+
+ public static final String CAPABILITY_UUIDS = "repository.uuids";
+
+ public static final String CAPABILITY_OFFLINE = "repository.offline";
+
+ public static final String CAPABILITY_RESTARTABLE = "repository.restartable";
+
public boolean isSupportingAudits();
public boolean isSupportingBranches();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IScenario.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IScenario.java
index ca3f82f232..d605733eb6 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IScenario.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IScenario.java
@@ -36,6 +36,8 @@ public interface IScenario extends ITestLifecycle, Serializable
public Set<IConfig> getConfigs();
+ public Set<String> getCapabilities();
+
public boolean isValid();
public void save();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/ISessionConfig.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/ISessionConfig.java
index dd56b476c6..ade3aa52c6 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/ISessionConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/ISessionConfig.java
@@ -17,6 +17,16 @@ import org.eclipse.emf.cdo.session.CDOSession;
*/
public interface ISessionConfig extends IConfig
{
+ public static final String CAPABILITY_EMBEDDED = "session.embedded";
+
+ public static final String CAPABILITY_NET4J = "session.net4j";
+
+ public static final String CAPABILITY_NET4J_JVM = "session.net4j.jvm";
+
+ public static final String CAPABILITY_NET4J_TCP = "session.net4j.tcp";
+
+ public static final String CAPABILITY_NET4J_SSL = "session.net4j.ssl";
+
public void startTransport() throws Exception;
public void stopTransport() throws Exception;
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ConfigTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ConfigTest.java
index 1459a9760a..4f3f65c309 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ConfigTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ConfigTest.java
@@ -12,7 +12,6 @@ package org.eclipse.emf.cdo.tests.config.impl;
import org.eclipse.emf.cdo.common.revision.CDORevisionManager;
import org.eclipse.emf.cdo.server.IRepository;
-import org.eclipse.emf.cdo.server.mem.IMEMStore;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevisionManager;
import org.eclipse.emf.cdo.spi.server.InternalRepository;
@@ -56,9 +55,11 @@ import org.eclipse.net4j.util.tests.AbstractOMTest;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
+import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
import java.text.MessageFormat;
import java.util.HashMap;
import java.util.Map;
@@ -73,16 +74,34 @@ public abstract class ConfigTest extends AbstractOMTest implements IConstants
{
@Inherited
@Retention(RetentionPolicy.RUNTIME)
+ @Target({ ElementType.TYPE, ElementType.METHOD })
public @interface CleanRepositoriesBefore
{
}
@Inherited
@Retention(RetentionPolicy.RUNTIME)
+ @Target({ ElementType.TYPE, ElementType.METHOD })
public @interface CleanRepositoriesAfter
{
}
+ @Inherited
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target({ ElementType.TYPE, ElementType.METHOD })
+ public @interface Requires
+ {
+ String[] value();
+ }
+
+ @Inherited
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target({ ElementType.TYPE, ElementType.METHOD })
+ public @interface Skips
+ {
+ String[] value();
+ }
+
public ConfigTest()
{
}
@@ -556,70 +575,6 @@ public abstract class ConfigTest extends AbstractOMTest implements IConstants
|| ObjectUtil.equals(getModelConfig(), config);
}
- protected void skipConfig(Config config)
- {
- skipTest(isConfig(config));
- }
-
- protected void skipUnlessConfig(Config config)
- {
- skipTest(!ObjectUtil.equals(getContainerConfig(), config) //
- && !ObjectUtil.equals(getRepositoryConfig(), config) //
- && !ObjectUtil.equals(getSessionConfig(), config) //
- && !ObjectUtil.equals(getModelConfig(), config));
- }
-
- protected void skipConfig(String name)
- {
- skipTest(ObjectUtil.equals(getContainerConfig().getName(), name) //
- || ObjectUtil.equals(getRepositoryConfig().getName(), name) //
- || ObjectUtil.equals(getSessionConfig().getName(), name) //
- || ObjectUtil.equals(getModelConfig().getName(), name));
- }
-
- protected void skipUnlessConfig(String name)
- {
- skipTest(!ObjectUtil.equals(getContainerConfig().getName(), name) //
- && !ObjectUtil.equals(getRepositoryConfig().getName(), name) //
- && !ObjectUtil.equals(getSessionConfig().getName(), name) //
- && !ObjectUtil.equals(getModelConfig().getName(), name));
- }
-
- protected void skipUnlessAuditing()
- {
- skipTest(!getRepository().isSupportingAudits());
- }
-
- protected void skipUnlessBranching()
- {
- skipTest(!getRepository().isSupportingBranches());
- }
-
- protected void skipMEM()
- {
- skipTest(getRepository().getStore() instanceof IMEMStore);
- }
-
- protected void skipUnlessMEM()
- {
- skipTest(!(getRepository().getStore() instanceof IMEMStore));
- }
-
- protected void skipMongo()
- {
- skipConfig("MongoDBStore");
- }
-
- protected void skipHibernate()
- {
- skipConfig("Hibernate");
- }
-
- protected void skipLegacy()
- {
- skipTest(getModelConfig() instanceof ModelConfig.Legacy);
- }
-
protected void skipStoreWithoutExternalReferences()
{
skipTest(getRepository().getStore() instanceof NoExternalReferences);
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ConfigTestSuite.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ConfigTestSuite.java
index 72fb18fed0..eee60e6d38 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ConfigTestSuite.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ConfigTestSuite.java
@@ -12,11 +12,15 @@ package org.eclipse.emf.cdo.tests.config.impl;
import org.eclipse.emf.cdo.tests.config.IConstants;
import org.eclipse.emf.cdo.tests.config.IScenario;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.Requires;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.Skips;
+import java.lang.reflect.AnnotatedElement;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.List;
+import java.util.Set;
import junit.framework.Test;
import junit.framework.TestResult;
@@ -56,8 +60,18 @@ public abstract class ConfigTestSuite implements IConstants
for (Class<? extends ConfigTest> testClass : testClasses)
{
- TestWrapper configSuite = new TestWrapper(testClass, scenario);
- suite.addTest(configSuite);
+ try
+ {
+ TestWrapper wrapper = new TestWrapper(testClass, scenario);
+ if (wrapper.testCount() != 0)
+ {
+ suite.addTest(wrapper);
+ }
+ }
+ catch (ConstraintsViolatedException ex)
+ {
+ //$FALL-THROUGH$
+ }
}
parent.addTest(suite);
@@ -71,11 +85,19 @@ public abstract class ConfigTestSuite implements IConstants
/**
* @author Eike Stepper
*/
+ private static final class ConstraintsViolatedException extends Exception
+ {
+ private static final long serialVersionUID = 1L;
+ }
+
+ /**
+ * @author Eike Stepper
+ */
private static final class TestWrapper extends TestSuite
{
private IScenario scenario;
- public TestWrapper(Class<? extends ConfigTest> testClass, IScenario scenario)
+ public TestWrapper(Class<? extends ConfigTest> testClass, IScenario scenario) throws ConstraintsViolatedException
{
// super(testClass, testClass.getName()); // Important for the UI to set the *qualified* class name!
this.scenario = scenario;
@@ -103,7 +125,7 @@ public abstract class ConfigTestSuite implements IConstants
}
}
- private void addTestsFromTestCase(final Class<?> theClass)
+ private void addTestsFromTestCase(final Class<?> theClass) throws ConstraintsViolatedException
{
setName(theClass.getName());
@@ -124,22 +146,63 @@ public abstract class ConfigTestSuite implements IConstants
return;
}
+ Set<String> capabilities = scenario.getCapabilities();
+
Class<?> superClass = theClass;
+ while (Test.class.isAssignableFrom(superClass))
+ {
+ if (!validateConstraints(superClass, capabilities))
+ {
+ throw new ConstraintsViolatedException();
+ }
+
+ superClass = superClass.getSuperclass();
+ }
+
List<String> names = new ArrayList<String>();
+
+ superClass = theClass;
while (Test.class.isAssignableFrom(superClass))
{
- for (Method each : superClass.getDeclaredMethods())
+ for (Method method : superClass.getDeclaredMethods())
{
- addTestMethod(each, names, theClass);
+ if (validateConstraints(method, capabilities))
+ {
+ addTestMethod(method, names, theClass);
+ }
}
superClass = superClass.getSuperclass();
}
+ }
- if (testCount() == 0)
+ private boolean validateConstraints(AnnotatedElement element, Set<String> capabilities)
+ {
+ Requires requires = element.getAnnotation(Requires.class);
+ if (requires != null)
{
- addTest(warning("No tests found in " + theClass.getName()));
+ for (String require : requires.value())
+ {
+ if (!capabilities.contains(require))
+ {
+ return false;
+ }
+ }
}
+
+ Skips skips = element.getAnnotation(Skips.class);
+ if (skips != null)
+ {
+ for (String skip : skips.value())
+ {
+ if (capabilities.contains(skip))
+ {
+ return false;
+ }
+ }
+ }
+
+ return true;
}
private void addTestMethod(Method m, List<String> names, Class<?> theClass)
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ContainerConfig.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ContainerConfig.java
index 600c03f27c..9971e5ac54 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ContainerConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ContainerConfig.java
@@ -19,6 +19,8 @@ import org.eclipse.net4j.util.container.ContainerUtil;
import org.eclipse.net4j.util.container.IManagedContainer;
import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
+import java.util.Set;
+
/**
* @author Eike Stepper
*/
@@ -73,6 +75,11 @@ public abstract class ContainerConfig extends Config implements IContainerConfig
super(NAME);
}
+ public void initCapabilities(Set<String> capabilities)
+ {
+ capabilities.add(CAPABILITY_COMBINED);
+ }
+
public synchronized IManagedContainer getClientContainer()
{
if (clientContainer == null)
@@ -116,6 +123,11 @@ public abstract class ContainerConfig extends Config implements IContainerConfig
super(NAME);
}
+ public void initCapabilities(Set<String> capabilities)
+ {
+ capabilities.add(CAPABILITY_SEPARATED);
+ }
+
public synchronized IManagedContainer getClientContainer()
{
if (clientContainer == null)
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ModelConfig.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ModelConfig.java
index f15c6fa33a..1e3238113e 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ModelConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ModelConfig.java
@@ -29,6 +29,8 @@ import org.eclipse.emf.cdo.tests.model5.Model5Package;
import org.eclipse.emf.cdo.tests.model6.Model6Factory;
import org.eclipse.emf.cdo.tests.model6.Model6Package;
+import java.util.Set;
+
/**
* @author Eike Stepper
*/
@@ -57,6 +59,11 @@ public abstract class ModelConfig extends Config implements IModelConfig
super(NAME);
}
+ public void initCapabilities(Set<String> capabilities)
+ {
+ capabilities.add(CAPABILITY_NATIVE);
+ }
+
public MangoFactory getMangoFactory()
{
return org.eclipse.emf.cdo.tests.mango.MangoFactory.eINSTANCE;
@@ -159,6 +166,11 @@ public abstract class ModelConfig extends Config implements IModelConfig
super(NAME);
}
+ public void initCapabilities(Set<String> capabilities)
+ {
+ capabilities.add(CAPABILITY_LEGACY);
+ }
+
public MangoFactory getMangoFactory()
{
return org.eclipse.emf.cdo.tests.legacy.mango.impl.MangoFactoryImpl.eINSTANCE;
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/RepositoryConfig.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/RepositoryConfig.java
index 4805f310ad..409492315a 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/RepositoryConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/RepositoryConfig.java
@@ -74,6 +74,7 @@ import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
+import java.util.Set;
/**
* @author Eike Stepper
@@ -124,6 +125,37 @@ public abstract class RepositoryConfig extends Config implements IRepositoryConf
this.idGenerationLocation = idGenerationLocation;
}
+ public void initCapabilities(Set<String> capabilities)
+ {
+ if (isSupportingAudits())
+ {
+ capabilities.add(CAPABILITY_AUDITING);
+ if (isSupportingBranches())
+ {
+ capabilities.add(CAPABILITY_BRANCHING);
+ }
+ }
+
+ if (getIDGenerationLocation() == IDGenerationLocation.CLIENT)
+ {
+ capabilities.add(CAPABILITY_UUIDS);
+ }
+
+ if (isRestartable())
+ {
+ capabilities.add(CAPABILITY_RESTARTABLE);
+ }
+
+ capabilities.add(getStoreName());
+ }
+
+ protected abstract String getStoreName();
+
+ public boolean isRestartable()
+ {
+ return true;
+ }
+
public boolean isSupportingAudits()
{
return supportingAudits;
@@ -585,6 +617,13 @@ public abstract class RepositoryConfig extends Config implements IRepositoryConf
}
@Override
+ public void initCapabilities(Set<String> capabilities)
+ {
+ super.initCapabilities(capabilities);
+ capabilities.add(CAPABILITY_OFFLINE);
+ }
+
+ @Override
public void setUp() throws Exception
{
JVMUtil.prepareContainer(getCurrentTest().getServerContainer());
@@ -788,11 +827,25 @@ public abstract class RepositoryConfig extends Config implements IRepositoryConf
*/
public static class MEMConfig extends RepositoryConfig
{
+ public static final String STORE_NAME = "MEM";
+
private static final long serialVersionUID = 1L;
public MEMConfig(boolean supportingAudits, boolean supportingBranches, IDGenerationLocation idGenerationLocation)
{
- super("MEM", supportingAudits, supportingBranches, idGenerationLocation);
+ super(STORE_NAME, supportingAudits, supportingBranches, idGenerationLocation);
+ }
+
+ @Override
+ protected String getStoreName()
+ {
+ return STORE_NAME;
+ }
+
+ @Override
+ public boolean isRestartable()
+ {
+ return false;
}
public IStore createStore(String repoName)
@@ -810,7 +863,19 @@ public abstract class RepositoryConfig extends Config implements IRepositoryConf
public MEMOfflineConfig(IDGenerationLocation idGenerationLocation)
{
- super("MEMOffline", idGenerationLocation);
+ super(MEMConfig.STORE_NAME + "Offline", idGenerationLocation);
+ }
+
+ @Override
+ protected String getStoreName()
+ {
+ return MEMConfig.STORE_NAME;
+ }
+
+ @Override
+ public boolean isRestartable()
+ {
+ return false;
}
public IStore createStore(String repoName)
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/Scenario.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/Scenario.java
index 5dfa9a8d4d..80a549752c 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/Scenario.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/Scenario.java
@@ -19,6 +19,7 @@ import org.eclipse.emf.cdo.tests.config.IScenario;
import org.eclipse.emf.cdo.tests.config.ISessionConfig;
import org.eclipse.net4j.util.WrappedException;
+import org.eclipse.net4j.util.collection.CaseInsensitiveStringSet;
import org.eclipse.net4j.util.io.IOUtil;
import org.eclipse.net4j.util.om.OMPlatform;
@@ -136,6 +137,16 @@ public class Scenario implements IScenario
return configs;
}
+ public Set<String> getCapabilities()
+ {
+ Set<String> capabilities = new CaseInsensitiveStringSet();
+ containerConfig.initCapabilities(capabilities);
+ repositoryConfig.initCapabilities(capabilities);
+ sessionConfig.initCapabilities(capabilities);
+ modelConfig.initCapabilities(capabilities);
+ return capabilities;
+ }
+
public boolean isValid()
{
Set<IConfig> configs = getConfigs();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/SessionConfig.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/SessionConfig.java
index 10a140806c..edf243f8ea 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/SessionConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/SessionConfig.java
@@ -217,6 +217,11 @@ public abstract class SessionConfig extends Config implements ISessionConfig
super(NAME);
}
+ public void initCapabilities(Set<String> capabilities)
+ {
+ capabilities.add(CAPABILITY_EMBEDDED);
+ }
+
public String getURIPrefix()
{
throw new UnsupportedOperationException();
@@ -248,6 +253,11 @@ public abstract class SessionConfig extends Config implements ISessionConfig
super(name);
}
+ public void initCapabilities(Set<String> capabilities)
+ {
+ capabilities.add(CAPABILITY_NET4J);
+ }
+
@Override
public void startTransport() throws Exception
{
@@ -354,6 +364,13 @@ public abstract class SessionConfig extends Config implements ISessionConfig
super(NAME);
}
+ @Override
+ public void initCapabilities(Set<String> capabilities)
+ {
+ super.initCapabilities(capabilities);
+ capabilities.add(CAPABILITY_NET4J_TCP);
+ }
+
public String getURIPrefix()
{
return "cdo.net4j.tcp://" + CONNECTOR_HOST;
@@ -418,6 +435,13 @@ public abstract class SessionConfig extends Config implements ISessionConfig
super(NAME);
}
+ @Override
+ public void initCapabilities(Set<String> capabilities)
+ {
+ super.initCapabilities(capabilities);
+ capabilities.add(CAPABILITY_NET4J_SSL);
+ }
+
public String getURIPrefix()
{
return "cdo.net4j.ssl://" + CONNECTOR_HOST;
@@ -482,6 +506,13 @@ public abstract class SessionConfig extends Config implements ISessionConfig
super(NAME);
}
+ @Override
+ public void initCapabilities(Set<String> capabilities)
+ {
+ super.initCapabilities(capabilities);
+ capabilities.add(CAPABILITY_NET4J_JVM);
+ }
+
public String getURIPrefix()
{
return "cdo.net4j.jvm://" + ACCEPTOR_NAME;
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/offline/Bugzilla_328352_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/offline/Bugzilla_328352_Test.java
index c3a48bdfa6..3011c2df92 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/offline/Bugzilla_328352_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/offline/Bugzilla_328352_Test.java
@@ -15,6 +15,7 @@ import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.spi.server.InternalRepository;
import org.eclipse.emf.cdo.tests.AbstractSyncingTest;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.CleanRepositoriesBefore;
import org.eclipse.emf.cdo.tests.model1.Category;
import org.eclipse.emf.cdo.tests.model1.Company;
@@ -43,9 +44,9 @@ public class Bugzilla_328352_Test extends AbstractSyncingTest
private final int NUM_CLIENT_VIEWS = 10;
+ @Requires(IRepositoryConfig.CAPABILITY_OFFLINE)
public void testOfflineCloneSynchronization() throws Exception
{
- skipUnlessConfig(getOfflineConfig());
disableConsole();
// create an offline clone.
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/offline/Bugzilla_329014_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/offline/Bugzilla_329014_Test.java
index a705a1057d..fe48027911 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/offline/Bugzilla_329014_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/offline/Bugzilla_329014_Test.java
@@ -16,6 +16,7 @@ import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.spi.server.InternalRepository;
import org.eclipse.emf.cdo.tests.AbstractSyncingTest;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.CleanRepositoriesBefore;
import org.eclipse.emf.cdo.tests.model1.Company;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
@@ -94,10 +95,9 @@ public class Bugzilla_329014_Test extends AbstractSyncingTest
super.doTearDown();
}
+ @Requires(IRepositoryConfig.CAPABILITY_OFFLINE)
public void testSynchronizationMasterCloneWithoutReplication() throws Exception
{
- skipUnlessConfig(getOfflineConfig());
-
// open transactions.
CDOTransaction masterTransaction = masterSession.openTransaction();
CDOTransaction cloneTransaction = cloneSession.openTransaction();
@@ -140,10 +140,9 @@ public class Bugzilla_329014_Test extends AbstractSyncingTest
assertEquals(masterCompany.getName(), cloneCompany.getName());
}
+ @Requires(IRepositoryConfig.CAPABILITY_OFFLINE)
public void testSynchronizationCloneMasterWithoutReplication() throws Exception
{
- skipUnlessConfig(getOfflineConfig());
-
// open transactions.
CDOTransaction masterTransaction = masterSession.openTransaction();
CDOTransaction cloneTransaction = cloneSession.openTransaction();
@@ -186,10 +185,9 @@ public class Bugzilla_329014_Test extends AbstractSyncingTest
assertEquals(cloneCompany.getName(), masterCompany.getName());
}
+ @Requires(IRepositoryConfig.CAPABILITY_OFFLINE)
public void testSynchronizationMasterCloneWithReplication() throws Exception
{
- skipUnlessConfig(getOfflineConfig());
-
// open transactions.
CDOTransaction masterTransaction = masterSession.openTransaction();
CDOTransaction cloneTransaction = cloneSession.openTransaction();
@@ -244,10 +242,9 @@ public class Bugzilla_329014_Test extends AbstractSyncingTest
assertEquals(masterCompany.getName(), cloneCompany.getName());
}
+ @Requires(IRepositoryConfig.CAPABILITY_OFFLINE)
public void testSynchronizationCloneMasterWithReplication() throws Exception
{
- skipUnlessConfig(getOfflineConfig());
-
// open transactions.
CDOTransaction masterTransaction = masterSession.openTransaction();
CDOTransaction cloneTransaction = cloneSession.openTransaction();
@@ -297,5 +294,4 @@ public class Bugzilla_329014_Test extends AbstractSyncingTest
// check.
assertEquals(cloneCompany.getName(), masterCompany.getName());
}
-
}
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/CaseInsensitiveStringSet.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/CaseInsensitiveStringSet.java
new file mode 100644
index 0000000000..180b61e1cd
--- /dev/null
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/CaseInsensitiveStringSet.java
@@ -0,0 +1,128 @@
+/**
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.util.collection;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+
+/**
+ * @author Eike Stepper
+ * @since 3.2
+ */
+public class CaseInsensitiveStringSet extends HashSet<String>
+{
+ private static final long serialVersionUID = 1L;
+
+ public CaseInsensitiveStringSet()
+ {
+ }
+
+ public CaseInsensitiveStringSet(Collection<? extends String> c)
+ {
+ super(c);
+ }
+
+ public CaseInsensitiveStringSet(int initialCapacity, float loadFactor)
+ {
+ super(initialCapacity, loadFactor);
+ }
+
+ public CaseInsensitiveStringSet(int initialCapacity)
+ {
+ super(initialCapacity);
+ }
+
+ public boolean isLowerCase()
+ {
+ return true;
+ }
+
+ @Override
+ public boolean contains(Object o)
+ {
+ return super.contains(convert(o));
+ }
+
+ @Override
+ public boolean add(String e)
+ {
+ return super.add(convert(e));
+ }
+
+ @Override
+ public boolean remove(Object o)
+ {
+ return super.remove(convert(o));
+ }
+
+ @Override
+ public boolean removeAll(Collection<?> c)
+ {
+ return super.removeAll(convert(c));
+ }
+
+ @Override
+ public boolean containsAll(Collection<?> c)
+ {
+ return super.containsAll(convert(c));
+ }
+
+ @Override
+ public boolean addAll(Collection<? extends String> c)
+ {
+ boolean modified = false;
+ Iterator<? extends String> e = c.iterator();
+ while (e.hasNext())
+ {
+ if (add(convert(e.next())))
+ {
+ modified = true;
+ }
+ }
+
+ return modified;
+ }
+
+ @Override
+ public boolean retainAll(Collection<?> c)
+ {
+ return super.retainAll(convert(c));
+ }
+
+ protected String convert(Object o)
+ {
+ if (o instanceof String)
+ {
+ if (isLowerCase())
+ {
+ return ((String)o).toLowerCase();
+ }
+
+ return ((String)o).toUpperCase();
+ }
+
+ return null;
+ }
+
+ protected Collection<?> convert(Collection<?> c)
+ {
+ Collection<Object> list = new ArrayList<Object>();
+ for (Iterator<?> it = c.iterator(); it.hasNext();)
+ {
+ Object o = it.next();
+ list.add(convert(o));
+ }
+
+ return list;
+ }
+}

Back to the top