Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2011-08-26 00:15:01 -0400
committerEike Stepper2011-08-26 00:15:01 -0400
commit0d0f0c489b9f244987cafc8dfae1437785fc2e16 (patch)
tree5be5835f9e313e2969bdfb52a68a95aec42fe118
parentb1d179afa361ef7ecac47f2b606b8c03f309a32f (diff)
downloadcdo-0d0f0c489b9f244987cafc8dfae1437785fc2e16.tar.gz
cdo-0d0f0c489b9f244987cafc8dfae1437785fc2e16.tar.xz
cdo-0d0f0c489b9f244987cafc8dfae1437785fc2e16.zip
prepare declarative skipping
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BackupTest.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.java14
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/FeatureMapTest.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LobTest.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/MetaTest.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/OCLQueryTest.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PartialCommitTest.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/WorkspaceTest.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/XATransactionTest.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/XRefTest.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_316434_Test.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_320690_Test.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_323930_Test.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_327604_Test.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_331619_Test.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_351067_Test.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_351096_Test.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_351393_Test.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ConfigTest.java12
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ConfigTestSuite.java112
21 files changed, 124 insertions, 80 deletions
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 9a9e059354..868714cd7c 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
@@ -58,7 +58,7 @@ public class BackupTest extends AbstractCDOTest
{
disableConsole();
super.doSetUp();
- skipRawAccess();
+ skipStoreWithoutRawAccess();
}
@Override
@@ -256,7 +256,9 @@ public class BackupTest extends AbstractCDOTest
*/
public void testImport() throws Exception
{
- skipTest(getRepositoryConfig().getName().contains("range-based"));
+ String configName = getRepositoryConfig().getName();
+ skipTest(configName.contains("range-based"));
+ skipTest(configName.contains("ranges"));
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
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 08242a24d5..be77f87904 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
@@ -324,7 +324,7 @@ public class CrossReferenceTest extends AbstractCDOTest
public void testDetachXRefExternal() throws Exception
{
- skipExternalReferences();
+ skipStoreWithoutExternalReferences();
skipConfig("Hibernate");
Customer customer = getModel1Factory().createCustomer();
@@ -391,7 +391,7 @@ public class CrossReferenceTest extends AbstractCDOTest
public void testNewMakeExternal() throws Exception
{
- skipExternalReferences();
+ skipStoreWithoutExternalReferences();
skipConfig("Hibernate");
Customer customer = getModel1Factory().createCustomer();
customer.setName("customer");
@@ -453,7 +453,7 @@ public class CrossReferenceTest extends AbstractCDOTest
public void testExternalMakeDangling() throws Exception
{
- skipExternalReferences();
+ skipStoreWithoutExternalReferences();
skipConfig("Hibernate");
Customer customer = getModel1Factory().createCustomer();
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 cd0a077537..45bce75944 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
@@ -62,7 +62,7 @@ public class ExternalReferenceTest extends AbstractCDOTest
@CleanRepositoriesBefore
public void testExternalWithDynamicEObject() throws Exception
{
- skipExternalReferences();
+ skipStoreWithoutExternalReferences();
ResourceSet resourceSet = new ResourceSetImpl();
resourceSet.getResourceFactoryRegistry().getProtocolToFactoryMap().put("test", new XMIResourceFactoryImpl());
@@ -92,7 +92,7 @@ public class ExternalReferenceTest extends AbstractCDOTest
public void testExternalWithEClass() throws Exception
{
- skipExternalReferences();
+ skipStoreWithoutExternalReferences();
{
ResourceSet resourceSet = new ResourceSetImpl();
@@ -127,7 +127,7 @@ public class ExternalReferenceTest extends AbstractCDOTest
public void testExternalWithEPackage() throws Exception
{
- skipExternalReferences();
+ skipStoreWithoutExternalReferences();
{
CDOSession sessionA = openSession();
@@ -163,7 +163,7 @@ public class ExternalReferenceTest extends AbstractCDOTest
public void testOneXMIResourceManyViewsOnOneResourceSet() throws Exception
{
- skipExternalReferences();
+ skipStoreWithoutExternalReferences();
byte[] dataOfresD = null;
getRepository(REPOSITORY_B_NAME);
@@ -273,7 +273,7 @@ public class ExternalReferenceTest extends AbstractCDOTest
{
// Skip this test until the problems with XATransactions are solved.
skipConfig(LEGACY);
- skipExternalReferences();
+ skipStoreWithoutExternalReferences();
getRepository(REPOSITORY_B_NAME);
@@ -385,7 +385,7 @@ public class ExternalReferenceTest extends AbstractCDOTest
public void testWithXML() throws Exception
{
- skipExternalReferences();
+ skipStoreWithoutExternalReferences();
ResourceSet resourceSet = new ResourceSetImpl();
Map<String, Object> map = resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap();
@@ -412,7 +412,7 @@ public class ExternalReferenceTest extends AbstractCDOTest
public void testWithXMLAndPrefetching() throws Exception
{
- skipExternalReferences();
+ skipStoreWithoutExternalReferences();
{
ResourceSet resourceSet = new ResourceSetImpl();
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 3a12dbb153..1fc760a313 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
@@ -183,7 +183,7 @@ public class FeatureMapTest extends AbstractCDOTest
public void testFeatureMaps() throws Exception
{
- skipFeatureMaps();
+ skipStoreWithoutFeatureMaps();
EReference feature = getModel5Package().getTestFeatureMap_Doctors();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LobTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LobTest.java
index 35c44c6d06..e92c1f4c48 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LobTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LobTest.java
@@ -40,7 +40,7 @@ public class LobTest extends AbstractCDOTest
protected void doSetUp() throws Exception
{
super.doSetUp();
- skipLargeObjects();
+ skipStoreWithoutLargeObjects();
lobID = null;
}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/MetaTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/MetaTest.java
index dace155947..7830de1646 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/MetaTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/MetaTest.java
@@ -24,7 +24,7 @@ public class MetaTest extends AbstractCDOTest
{
public void testMetaReference() throws Exception
{
- skipExternalReferences();
+ skipStoreWithoutExternalReferences();
{
CDOSession session = openSession();
@@ -48,7 +48,7 @@ public class MetaTest extends AbstractCDOTest
public void testMetaReferenceAttachFirst() throws Exception
{
- skipExternalReferences();
+ skipStoreWithoutExternalReferences();
{
CDOSession session = openSession();
@@ -72,7 +72,7 @@ public class MetaTest extends AbstractCDOTest
public void testMetaReference2() throws Exception
{
- skipExternalReferences();
+ skipStoreWithoutExternalReferences();
EReference targetRef = getModel3SubpackagePackage().getClass2_Class1();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/OCLQueryTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/OCLQueryTest.java
index 23fe47a0ce..34dceacc16 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/OCLQueryTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/OCLQueryTest.java
@@ -57,7 +57,7 @@ public class OCLQueryTest extends AbstractCDOTest
protected void doSetUp() throws Exception
{
super.doSetUp();
- skipHandleRevisions();
+ skipStoreWithoutHandleRevisions();
CDOSession session = openSession();
transaction = session.openTransaction();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PartialCommitTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PartialCommitTest.java
index 860b269e6f..082f45145f 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PartialCommitTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PartialCommitTest.java
@@ -252,7 +252,7 @@ public class PartialCommitTest extends AbstractCDOTest
public void testPartialCleanUp_detachedObjects() throws CommitException
{
- skipQueryXRefs();
+ skipStoreWithoutQueryXRefs();
simpleModel1Setup();
Category cat = Model1Factory.eINSTANCE.createCategory();
@@ -372,7 +372,7 @@ public class PartialCommitTest extends AbstractCDOTest
@CleanRepositoriesBefore
public void testDetach() throws CommitException
{
- skipQueryXRefs();
+ skipStoreWithoutQueryXRefs();
simpleModel1Setup();
EcoreUtil.delete(purchaseOrder);
@@ -542,7 +542,7 @@ public class PartialCommitTest extends AbstractCDOTest
public void testDetachSingleRef() throws CommitException
{
- skipQueryXRefs();
+ skipStoreWithoutQueryXRefs();
simpleModel4ContainmentSetup();
refSingleContained1.setElement(null);
@@ -837,7 +837,7 @@ public class PartialCommitTest extends AbstractCDOTest
public void testSingleBidiOnRemovedObject() throws CommitException
{
- skipQueryXRefs();
+ skipStoreWithoutQueryXRefs();
simpleModel4SingleBidiSetup();
EcoreUtil.delete(singleNonContainedElement1);
@@ -945,7 +945,7 @@ public class PartialCommitTest extends AbstractCDOTest
public void testMultiBidiOnRemovedObject() throws CommitException
{
- skipQueryXRefs();
+ skipStoreWithoutQueryXRefs();
simpleModel4MultiBidiSetup();
EcoreUtil.delete(multiNonContainedElement1);
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 d4c2ae19c5..06e354d551 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
@@ -97,7 +97,7 @@ public class WorkspaceTest extends AbstractCDOTest
super.doSetUp();
skipUnlessAuditing();
- skipHandleRevisions();
+ skipStoreWithoutHandleRevisions();
CDOSession session = openSession();
transaction = session.openTransaction();
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 295254d6ae..440a8234ab 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
@@ -84,7 +84,7 @@ public class XATransactionTest extends AbstractCDOTest
@CleanRepositoriesBefore
public void testRollback_AfterSetpoint() throws Exception
{
- skipExternalReferences();
+ skipStoreWithoutExternalReferences();
getRepository(REPOSITORY2_NAME);
CDOSession sessionA = openSession();
@@ -145,7 +145,7 @@ public class XATransactionTest extends AbstractCDOTest
public void testCommitFromTransactionDisabled() throws Exception
{
- skipExternalReferences();
+ skipStoreWithoutExternalReferences();
getRepository(REPOSITORY2_NAME);
{
@@ -193,7 +193,7 @@ public class XATransactionTest extends AbstractCDOTest
{
// Skip this test until the problems with XATransactions are solved.
skipConfig(LEGACY);
- skipExternalReferences();
+ skipStoreWithoutExternalReferences();
skipTest(getRepositoryConfig().getIDGenerationLocation() == IDGenerationLocation.CLIENT);
getRepository(REPOSITORY2_NAME);
@@ -237,7 +237,7 @@ public class XATransactionTest extends AbstractCDOTest
public void test_ExceptionInReadingStream() throws Exception
{
- skipExternalReferences();
+ skipStoreWithoutExternalReferences();
getRepository(REPOSITORY2_NAME);
CDOSession sessionA = openSession();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/XRefTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/XRefTest.java
index 3844089407..93c581f531 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/XRefTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/XRefTest.java
@@ -50,7 +50,7 @@ public class XRefTest extends AbstractCDOTest
protected void doSetUp() throws Exception
{
super.doSetUp();
- skipQueryXRefs();
+ skipStoreWithoutQueryXRefs();
}
public void testCrossReferenceMultivalueEReferenceQuery() throws Exception
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_316434_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_316434_Test.java
index 3750e170f3..c94f0ac751 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_316434_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_316434_Test.java
@@ -39,7 +39,7 @@ public class Bugzilla_316434_Test extends AbstractCDOTest
public void testInitial() throws Exception
{
- skipQueryXRefs();
+ skipStoreWithoutQueryXRefs();
{
ContainedElementNoOpposite target = getModel4Factory().createContainedElementNoOpposite();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_320690_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_320690_Test.java
index b9fbc80af6..09da26b1f4 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_320690_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_320690_Test.java
@@ -38,7 +38,7 @@ public class Bugzilla_320690_Test extends AbstractCDOTest
public void testLockRefTargets() throws Exception
{
- skipQueryXRefs();
+ skipStoreWithoutQueryXRefs();
CDOSession session1 = openSession();
session1.options().setPassiveUpdateEnabled(false);
@@ -117,7 +117,7 @@ public class Bugzilla_320690_Test extends AbstractCDOTest
public void testDeleteTargetAndReferenceAtOnce() throws Exception
{
- skipQueryXRefs();
+ skipStoreWithoutQueryXRefs();
NodeA a = getModel3Factory().createNodeA();
NodeA b = getModel3Factory().createNodeA();
NodeA c = getModel3Factory().createNodeA();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_323930_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_323930_Test.java
index e829f187bf..d4faebe292 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_323930_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_323930_Test.java
@@ -36,7 +36,7 @@ public class Bugzilla_323930_Test extends AbstractCDOTest
protected void doSetUp() throws Exception
{
super.doSetUp();
- skipQueryXRefs();
+ skipStoreWithoutQueryXRefs();
}
public void testChangeIndexesInTargetList() throws Exception
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 d191576574..d2a843e572 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
@@ -137,7 +137,7 @@ public class Bugzilla_327604_Test extends AbstractCDOTest
@CleanRepositoriesBefore
public void testReadObjects() throws Exception
{
- skipHandleRevisions();
+ skipStoreWithoutHandleRevisions();
InternalCDOWorkspace workspace = checkout("MAIN", CDOBranchPoint.UNSPECIFIED_DATE);
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_331619_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_331619_Test.java
index 2a1593b167..7f792f8975 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_331619_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_331619_Test.java
@@ -40,7 +40,7 @@ public class Bugzilla_331619_Test extends AbstractCDOTest
@SuppressWarnings("unchecked")
public void testAbstractXRef() throws CommitException
{
- skipQueryXRefs();
+ skipStoreWithoutQueryXRefs();
// set up model
EPackage pkg = EMFUtil.createEPackage("test", "test", "http://www.eclipse.org/CDO/Tests/331619.ecore");
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_351067_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_351067_Test.java
index 866cceae0b..bba09cffb8 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_351067_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_351067_Test.java
@@ -29,7 +29,7 @@ public class Bugzilla_351067_Test extends AbstractCDOTest
{
public void testCommitBlob() throws Exception
{
- skipLargeObjects();
+ skipStoreWithoutLargeObjects();
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_351096_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_351096_Test.java
index 22257d1c36..f6e0d9864f 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_351096_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_351096_Test.java
@@ -33,7 +33,7 @@ public class Bugzilla_351096_Test extends AbstractCDOTest
{
public void testCommit2Blob() throws Exception
{
- skipLargeObjects();
+ skipStoreWithoutLargeObjects();
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
@@ -73,7 +73,7 @@ public class Bugzilla_351096_Test extends AbstractCDOTest
public void testCommit2Clob() throws Exception
{
- skipLargeObjects();
+ skipStoreWithoutLargeObjects();
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_351393_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_351393_Test.java
index 888261098c..c4f868502b 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_351393_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_351393_Test.java
@@ -30,7 +30,7 @@ public class Bugzilla_351393_Test extends AbstractCDOTest
{
public void testExtRef() throws Exception
{
- skipExternalReferences();
+ skipStoreWithoutExternalReferences();
ResourceSet resourceSet = new ResourceSetImpl();
resourceSet.getResourceFactoryRegistry().getProtocolToFactoryMap().put("test", new XMIResourceFactoryImpl());
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 69ba96fd8c..1459a9760a 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
@@ -620,32 +620,32 @@ public abstract class ConfigTest extends AbstractOMTest implements IConstants
skipTest(getModelConfig() instanceof ModelConfig.Legacy);
}
- protected void skipExternalReferences()
+ protected void skipStoreWithoutExternalReferences()
{
skipTest(getRepository().getStore() instanceof NoExternalReferences);
}
- protected void skipQueryXRefs()
+ protected void skipStoreWithoutQueryXRefs()
{
skipTest(getRepository().getStore() instanceof NoQueryXRefs);
}
- protected void skipLargeObjects()
+ protected void skipStoreWithoutLargeObjects()
{
skipTest(getRepository().getStore() instanceof NoLargeObjects);
}
- protected void skipFeatureMaps()
+ protected void skipStoreWithoutFeatureMaps()
{
skipTest(getRepository().getStore() instanceof NoFeatureMaps);
}
- protected void skipHandleRevisions()
+ protected void skipStoreWithoutHandleRevisions()
{
skipTest(getRepository().getStore() instanceof NoHandleRevisions);
}
- protected void skipRawAccess()
+ protected void skipStoreWithoutRawAccess()
{
skipTest(getRepository().getStore() instanceof NoRawAccess);
}
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 5bcc8c74c8..72fb18fed0 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
@@ -13,6 +13,8 @@ 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 java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.List;
@@ -36,23 +38,6 @@ public abstract class ConfigTestSuite implements IConstants
return suite;
}
- // protected void initConfigSuites(TestSuite parent)
- // {
- // for (ContainerConfig containerConfig : ContainerConfig.CONFIGS)
- // {
- // for (RepositoryConfig repositoryConfig : RepositoryConfig.CONFIGS)
- // {
- // for (SessionConfig sessionConfig : SessionConfig.CONFIGS)
- // {
- // for (ModelConfig modelConfig : ModelConfig.CONFIGS)
- // {
- // initConfigSuite(parent, containerConfig, repositoryConfig, sessionConfig, modelConfig);
- // }
- // }
- // }
- // }
- // }
-
public void addScenario(TestSuite parent, ContainerConfig containerConfig, RepositoryConfig repositoryConfig,
SessionConfig sessionConfig, ModelConfig modelConfig)
{
@@ -81,23 +66,6 @@ public abstract class ConfigTestSuite implements IConstants
protected abstract void initConfigSuites(TestSuite parent);
- // protected void initConfigSuites(TestSuite parent)
- // {
- // for (ContainerConfig containerConfig : ContainerConfig.CONFIGS)
- // {
- // for (RepositoryConfig repositoryConfig : RepositoryConfig.CONFIGS)
- // {
- // for (SessionConfig sessionConfig : SessionConfig.CONFIGS)
- // {
- // for (ModelConfig modelConfig : ModelConfig.CONFIGS)
- // {
- // initConfigSuite(parent, containerConfig, repositoryConfig, sessionConfig, modelConfig);
- // }
- // }
- // }
- // }
- // }
-
protected abstract void initTestClasses(List<Class<? extends ConfigTest>> testClasses, IScenario scenario);
/**
@@ -109,8 +77,9 @@ public abstract class ConfigTestSuite implements IConstants
public TestWrapper(Class<? extends ConfigTest> testClass, IScenario scenario)
{
- super(testClass, testClass.getName()); // Important for the UI to set the *qualified* class name!
+ // super(testClass, testClass.getName()); // Important for the UI to set the *qualified* class name!
this.scenario = scenario;
+ addTestsFromTestCase(testClass);
}
@Override
@@ -119,8 +88,10 @@ public abstract class ConfigTestSuite implements IConstants
if (test instanceof ConfigTest)
{
scenario.save();
+
ConfigTest configTest = (ConfigTest)test;
configTest.setScenario(scenario);
+
if (configTest.isValid())
{
super.runTest(configTest, result);
@@ -131,5 +102,76 @@ public abstract class ConfigTestSuite implements IConstants
super.runTest(test, result);
}
}
+
+ private void addTestsFromTestCase(final Class<?> theClass)
+ {
+ setName(theClass.getName());
+
+ try
+ {
+ getTestConstructor(theClass); // Avoid generating multiple error messages
+ }
+ catch (NoSuchMethodException e)
+ {
+ addTest(warning("Class " + theClass.getName()
+ + " has no public constructor TestCase(String name) or TestCase()"));
+ return;
+ }
+
+ if (!Modifier.isPublic(theClass.getModifiers()))
+ {
+ addTest(warning("Class " + theClass.getName() + " is not public"));
+ return;
+ }
+
+ Class<?> superClass = theClass;
+ List<String> names = new ArrayList<String>();
+ while (Test.class.isAssignableFrom(superClass))
+ {
+ for (Method each : superClass.getDeclaredMethods())
+ {
+ addTestMethod(each, names, theClass);
+ }
+
+ superClass = superClass.getSuperclass();
+ }
+
+ if (testCount() == 0)
+ {
+ addTest(warning("No tests found in " + theClass.getName()));
+ }
+ }
+
+ private void addTestMethod(Method m, List<String> names, Class<?> theClass)
+ {
+ String name = m.getName();
+ if (names.contains(name))
+ {
+ return;
+ }
+
+ if (!isPublicTestMethod(m))
+ {
+ if (isTestMethod(m))
+ {
+ addTest(warning("Test method isn't public: " + m.getName() + "(" + theClass.getCanonicalName() + ")"));
+ }
+
+ return;
+ }
+
+ names.add(name);
+ addTest(createTest(theClass, name));
+ }
+
+ private boolean isPublicTestMethod(Method m)
+ {
+ return isTestMethod(m) && Modifier.isPublic(m.getModifiers());
+ }
+
+ private boolean isTestMethod(Method m)
+ {
+ return m.getParameterTypes().length == 0 && m.getName().startsWith("test") && m.getReturnType().equals(Void.TYPE);
+ }
}
}

Back to the top