Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIbrahim Sallam2010-06-11 05:21:54 +0000
committerIbrahim Sallam2010-06-11 05:21:54 +0000
commit1c5662df027cfdf4a1a1b9009b2c94cb6c66975f (patch)
treeb06597036823456c46047dca9e6c8bebb0835eb2 /plugins/org.eclipse.emf.cdo.tests.objectivity
parent9345778e56788457f3692e4bdae6bd9808f5962b (diff)
downloadcdo-1c5662df027cfdf4a1a1b9009b2c94cb6c66975f.tar.gz
cdo-1c5662df027cfdf4a1a1b9009b2c94cb6c66975f.tar.xz
cdo-1c5662df027cfdf4a1a1b9009b2c94cb6c66975f.zip
Various changes to get the tests to run with the latest changes in the CDO tests.
Created various launchers for different set of tests.
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.tests.objectivity')
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.objectivity/CDO AllTests (Objectivity) Audit.launch (renamed from plugins/org.eclipse.emf.cdo.tests.objectivity/CDO AllTests (Objectivity).launch)10
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.objectivity/CDO AllTests (Objectivity) Branching.launch26
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.objectivity/build.properties2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/AllTestsObjy.java37
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/AllTestsObjyAudit.java80
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/AllTestsObjyBranching.java89
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/AllTestsObjyNonAudit.java61
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/ObjyDBConfigs.java59
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/ObjyStoreQueryTest.java94
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/ObjyStoreRepositoryConfig.java62
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/SampleTestsObjy.java157
11 files changed, 511 insertions, 166 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.objectivity/CDO AllTests (Objectivity).launch b/plugins/org.eclipse.emf.cdo.tests.objectivity/CDO AllTests (Objectivity) Audit.launch
index 775379a27c..4c75075501 100644
--- a/plugins/org.eclipse.emf.cdo.tests.objectivity/CDO AllTests (Objectivity).launch
+++ b/plugins/org.eclipse.emf.cdo.tests.objectivity/CDO AllTests (Objectivity) Audit.launch
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/AllTestsObjy.java"/>
+<listEntry value="/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/AllTestsObjyAudit.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
@@ -10,11 +10,17 @@
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
</listAttribute>
+<stringAttribute key="org.eclipse.hyades.trace.ui.ATTR_DATA_COLLECTOR" value="org.eclipse.tptp.trace.jvmti.jvmtiMechanism:org.eclipse.tptp.analysisType.jvmti.execution"/>
+<stringAttribute key="org.eclipse.hyades.trace.ui.ATTR_DESTINATION_FILE" value=""/>
+<stringAttribute key="org.eclipse.hyades.trace.ui.ATTR_DESTINATION_MONITOR" value="DefaultMonitor"/>
+<stringAttribute key="org.eclipse.hyades.trace.ui.ATTR_DESTINATION_PROJECT" value="ProfileProject"/>
+<booleanAttribute key="org.eclipse.hyades.trace.ui.ATTR_PROFILE_TO_FILE" value="false"/>
+<stringAttribute key="org.eclipse.hyades.trace.ui.ATTR_PROFILING_SET" value="tptp-dummy-profiling-set-CDO AllTests (Objectivity)"/>
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.cdo.tests.objectivity.AllTestsObjy"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.cdo.tests.objectivity.AllTestsObjyAudit"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.emf.cdo.tests.objectivity"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m&#13;&#10;-Xmx512m"/>
</launchConfiguration>
diff --git a/plugins/org.eclipse.emf.cdo.tests.objectivity/CDO AllTests (Objectivity) Branching.launch b/plugins/org.eclipse.emf.cdo.tests.objectivity/CDO AllTests (Objectivity) Branching.launch
new file mode 100644
index 0000000000..fcfb764ea3
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.objectivity/CDO AllTests (Objectivity) Branching.launch
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/AllTestsObjyBranching.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.hyades.trace.ui.ATTR_DATA_COLLECTOR" value="org.eclipse.tptp.trace.jvmti.jvmtiMechanism:org.eclipse.tptp.analysisType.jvmti.execution"/>
+<stringAttribute key="org.eclipse.hyades.trace.ui.ATTR_DESTINATION_FILE" value=""/>
+<stringAttribute key="org.eclipse.hyades.trace.ui.ATTR_DESTINATION_MONITOR" value="DefaultMonitor"/>
+<stringAttribute key="org.eclipse.hyades.trace.ui.ATTR_DESTINATION_PROJECT" value="ProfileProject"/>
+<booleanAttribute key="org.eclipse.hyades.trace.ui.ATTR_PROFILE_TO_FILE" value="false"/>
+<stringAttribute key="org.eclipse.hyades.trace.ui.ATTR_PROFILING_SET" value="tptp-dummy-profiling-set-CDO AllTests (Objectivity)"/>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.cdo.tests.objectivity.AllTestsObjyBranching"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.emf.cdo.tests.objectivity"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m&#13;&#10;-Xmx512m"/>
+</launchConfiguration>
diff --git a/plugins/org.eclipse.emf.cdo.tests.objectivity/build.properties b/plugins/org.eclipse.emf.cdo.tests.objectivity/build.properties
index 45f0db3653..f140eb80f0 100644
--- a/plugins/org.eclipse.emf.cdo.tests.objectivity/build.properties
+++ b/plugins/org.eclipse.emf.cdo.tests.objectivity/build.properties
@@ -18,7 +18,7 @@ bin.includes = .,\
.options,\
ObjyStore AllTests (Standalone).launch,\
CDO AllTests (Objectivity) NonAudit.launch,\
- CDO AllTests (Objectivity).launch
+ CDO AllTests (Objectivity) Audit.launch
jars.compile.order = .
source.. = src/
output.. = bin/
diff --git a/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/AllTestsObjy.java b/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/AllTestsObjy.java
deleted file mode 100644
index 89294c92c5..0000000000
--- a/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/AllTestsObjy.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Copyright (c) 2004 - 2009 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.objectivity;
-
-import org.eclipse.net4j.util.io.IOUtil;
-import org.eclipse.net4j.util.io.TMPUtil;
-
-import java.io.File;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-/**
- * @author Eike Stepper
- */
-public class AllTestsObjy extends ObjyDBConfigs
-{
- public static Test suite()
- {
- return new AllTestsObjy().getTestSuite("CDO Tests (DBStoreRepositoryConfig Objectivity/DB)");
- }
-
- @Override
- protected void initConfigSuites(TestSuite parent)
- {
- ObjyStoreRepositoryConfig repConfig = new ObjyStoreRepositoryConfig();
- addScenario(parent, COMBINED, repConfig, JVM, NATIVE);
- }
-}
diff --git a/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/AllTestsObjyAudit.java b/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/AllTestsObjyAudit.java
new file mode 100644
index 0000000000..7ec6fabf0d
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/AllTestsObjyAudit.java
@@ -0,0 +1,80 @@
+/**
+ * Copyright (c) 2004 - 2009 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
+ * Victor Roldan Betancort - 289360: [DB] [maintenance] Support FeatureMaps
+ */
+package org.eclipse.emf.cdo.tests.objectivity;
+
+import org.eclipse.emf.cdo.server.IRepository;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest;
+
+import java.util.List;
+import java.util.Map;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author Eike Stepper
+ */
+public class AllTestsObjyAudit extends ObjyDBConfigs
+{
+ public static Test suite()
+ {
+ return new AllTestsObjyAudit().getTestSuite("CDO Tests (ObjectivityStore - audit mode)"); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void initConfigSuites(TestSuite parent)
+ {
+ ObjyStoreRepositoryConfig repoConfig = ObjyAuditConfig.INSTANCE;
+ addScenario(parent, COMBINED, repoConfig, JVM, NATIVE);
+ }
+
+ @Override
+ protected void initTestClasses(List<Class<? extends ConfigTest>> testClasses)
+ {
+ super.initTestClasses(testClasses);
+ }
+
+ @Override
+ protected boolean hasAuditSupport()
+ {
+ return true;
+ }
+
+ @Override
+ protected boolean hasBranchingSupport()
+ {
+ return false;
+ }
+
+ public static class ObjyAuditConfig extends ObjyStoreRepositoryConfig
+ {
+ private static final long serialVersionUID = 1L;
+
+ public static final AllTestsObjyAudit.ObjyAuditConfig INSTANCE = new ObjyAuditConfig("ObjectivityStore: (audit)"); //$NON-NLS-1$
+
+ public ObjyAuditConfig(String name)
+ {
+ super(name);
+
+ 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 void initRepositoryProperties(Map<String, String> props)
+ {
+ super.initRepositoryProperties(props);
+ props.put(IRepository.Props.SUPPORTING_AUDITS, "true");
+ props.put(IRepository.Props.SUPPORTING_BRANCHES, "false");
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/AllTestsObjyBranching.java b/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/AllTestsObjyBranching.java
new file mode 100644
index 0000000000..020d801617
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/AllTestsObjyBranching.java
@@ -0,0 +1,89 @@
+/**
+ * Copyright (c) 2004 - 2009 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
+ * Victor Roldan Betancort - 289360: [DB] [maintenance] Support FeatureMaps
+ */
+package org.eclipse.emf.cdo.tests.objectivity;
+
+import org.eclipse.emf.cdo.server.IRepository;
+import org.eclipse.emf.cdo.tests.BranchingTest;
+import org.eclipse.emf.cdo.tests.BranchingTestSameSession;
+import org.eclipse.emf.cdo.tests.MergingTest;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest;
+
+import java.util.List;
+import java.util.Map;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author Eike Stepper
+ */
+public class AllTestsObjyBranching extends ObjyDBConfigs
+{
+ public static Test suite()
+ {
+ return new AllTestsObjyBranching().getTestSuite("CDO Tests (ObjectivityStore - branching mode)"); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void initConfigSuites(TestSuite parent)
+ {
+ ObjyStoreRepositoryConfig repoConfig = ObjyBranchingConfig.INSTANCE;
+ addScenario(parent, COMBINED, repoConfig, JVM, NATIVE);
+ }
+
+ @Override
+ protected void initTestClasses(List<Class<? extends ConfigTest>> testClasses)
+ {
+ super.initTestClasses(testClasses);
+
+ // add branching tests for this testsuite
+ testClasses.add(BranchingTest.class);
+ testClasses.add(BranchingTestSameSession.class);
+ testClasses.add(MergingTest.class);
+ }
+
+ @Override
+ protected boolean hasAuditSupport()
+ {
+ return true;
+ }
+
+ @Override
+ protected boolean hasBranchingSupport()
+ {
+ return true;
+ }
+
+ public static class ObjyBranchingConfig extends ObjyStoreRepositoryConfig
+ {
+ private static final long serialVersionUID = 1L;
+
+ public static final AllTestsObjyBranching.ObjyBranchingConfig INSTANCE = new ObjyBranchingConfig(
+ "ObjectivityStore: (branching)"); //$NON-NLS-1$
+
+ public ObjyBranchingConfig(String name)
+ {
+ super(name);
+
+ 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 void initRepositoryProperties(Map<String, String> props)
+ {
+ super.initRepositoryProperties(props);
+ props.put(IRepository.Props.SUPPORTING_AUDITS, "true");
+ props.put(IRepository.Props.SUPPORTING_BRANCHES, "true");
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/AllTestsObjyNonAudit.java b/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/AllTestsObjyNonAudit.java
index e56dbc2c5b..7050ce3bcd 100644
--- a/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/AllTestsObjyNonAudit.java
+++ b/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/AllTestsObjyNonAudit.java
@@ -11,17 +11,14 @@
*/
package org.eclipse.emf.cdo.tests.objectivity;
+import org.eclipse.emf.cdo.server.IRepository;
import org.eclipse.emf.cdo.tests.AuditTest;
import org.eclipse.emf.cdo.tests.AuditTestSameSession;
-import org.eclipse.emf.cdo.tests.BranchingTest;
-import org.eclipse.emf.cdo.tests.BranchingTestSameSession;
-import org.eclipse.emf.cdo.tests.ExternalReferenceTest;
-import org.eclipse.emf.cdo.tests.XATransactionTest;
import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_252214_Test;
import org.eclipse.emf.cdo.tests.config.impl.ConfigTest;
-
import java.util.List;
+import java.util.Map;
import junit.framework.Test;
import junit.framework.TestSuite;
@@ -33,14 +30,14 @@ public class AllTestsObjyNonAudit extends ObjyDBConfigs
{
public static Test suite()
{
- return new AllTestsObjyNonAudit()
- .getTestSuite("CDO Tests (DBStoreRepositoryConfig Objectivity/DB - non-audit mode)");
+ return new AllTestsObjyNonAudit().getTestSuite("CDO Tests (ObjectivityStore - non-audit mode)"); //$NON-NLS-1$
}
@Override
protected void initConfigSuites(TestSuite parent)
{
- ObjyStoreRepositoryConfig repoConfig = new ObjyStoreRepositoryConfig();
+ // ObjyStoreRepositoryConfig repoConfig = ObjyNonAuditConfig.INSTANCE;
+ ObjyStoreRepositoryConfig repoConfig = new ObjyNonAuditConfig("ObjectivityStore: (non-audit)"); //$NON-NLS-1$
addScenario(parent, COMBINED, repoConfig, JVM, NATIVE);
}
@@ -54,14 +51,48 @@ public class AllTestsObjyNonAudit extends ObjyDBConfigs
testClasses.remove(AuditTestSameSession.class);
testClasses.remove(Bugzilla_252214_Test.class);
// non-branching mode - remove branch tests.
- testClasses.remove(BranchingTest.class);
- testClasses.remove(BranchingTestSameSession.class);
-
+ // testClasses.remove(BranchingTest.class);
+ // testClasses.remove(BranchingTestSameSession.class);
+
// Objy has a deadlock issue which prevent this test from completing.
-// testClasses.remove(ExternalReferenceTest.class);
-// testClasses.remove(XATransactionTest.class);
-
-
+ // testClasses.remove(ExternalReferenceTest.class);
+ // testClasses.remove(XATransactionTest.class);
+
}
+ @Override
+ protected boolean hasAuditSupport()
+ {
+ return false;
+ }
+
+ @Override
+ protected boolean hasBranchingSupport()
+ {
+ return false;
+ }
+
+ public static class ObjyNonAuditConfig extends ObjyStoreRepositoryConfig
+ {
+ private static final long serialVersionUID = 1L;
+
+ public static final AllTestsObjyNonAudit.ObjyNonAuditConfig INSTANCE = new ObjyNonAuditConfig(
+ "ObjectivityStore: (non-audit)"); //$NON-NLS-1$
+
+ public ObjyNonAuditConfig(String name)
+ {
+ super(name);
+
+ 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 void initRepositoryProperties(Map<String, String> props)
+ {
+ super.initRepositoryProperties(props);
+ props.put(IRepository.Props.SUPPORTING_AUDITS, "false");
+ props.put(IRepository.Props.SUPPORTING_BRANCHES, "false");
+ }
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/ObjyDBConfigs.java b/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/ObjyDBConfigs.java
index fbb8e78615..3d31ca843b 100644
--- a/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/ObjyDBConfigs.java
+++ b/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/ObjyDBConfigs.java
@@ -1,39 +1,52 @@
package org.eclipse.emf.cdo.tests.objectivity;
-import org.eclipse.emf.cdo.tests.AllTestsAllConfigs;
-import org.eclipse.emf.cdo.tests.ChunkingTest;
-import org.eclipse.emf.cdo.tests.ExternalReferenceTest;
-import org.eclipse.emf.cdo.tests.MultiValuedOfAttributeTest;
-import org.eclipse.emf.cdo.tests.ResourceTest;
+import org.eclipse.emf.cdo.tests.AllConfigs;
+import org.eclipse.emf.cdo.tests.AuditTest;
+import org.eclipse.emf.cdo.tests.AuditTestSameSession;
+import org.eclipse.emf.cdo.tests.BranchingTest;
+import org.eclipse.emf.cdo.tests.BranchingTestSameSession;
+import org.eclipse.emf.cdo.tests.MergingTest;
import org.eclipse.emf.cdo.tests.XATransactionTest;
-import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_258933_Test;
-import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_259869_Test;
-import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_266982_Test;
+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.impl.ConfigTest;
import java.util.List;
-public abstract class ObjyDBConfigs extends AllTestsAllConfigs
+public abstract class ObjyDBConfigs extends AllConfigs
{
@Override
protected void initTestClasses(List<Class<? extends ConfigTest>> testClasses)
{
super.initTestClasses(testClasses);
- // this takes ages ...
- //testClasses.remove(Bugzilla_266982_Test.class);
-
- // completely disabled because of Bug 254455:
- testClasses.remove(MultiValuedOfAttributeTest.class);
-
- // and partially disabled because of the same Bug 254455 ->
- //testClasses.remove(ChunkingTest.class);
- //testClasses.add(DISABLED_ChunkingTest.class);
-
- // partially disabled because of Bug 283992:
- //testClasses.remove(ResourceTest.class);
- //testClasses.add(DISABLED_ResourceTest.class);
+ // remove BranchingTests because most mappings do not support it
+ // Subclasses should add Banching tests if supported
+ if (!hasBranchingSupport())
+ {
+ testClasses.remove(BranchingTest.class);
+ testClasses.remove(BranchingTestSameSession.class);
+ testClasses.remove(MergingTest.class);
+ testClasses.remove(Bugzilla_303807_Test.class);
+ }
+
+ if (!hasAuditSupport())
+ {
+ // non-audit mode - remove audit tests
+ testClasses.remove(AuditTest.class);
+ testClasses.remove(AuditTestSameSession.class);
+ testClasses.remove(Bugzilla_252214_Test.class);
+ }
+
+ // testClasses.add(DBStoreTest.class);
+ // testClasses.add(SQLQueryTest.class);
+ // testClasses.add(DBAnnotationsTest.class);
+
+ // sometime cause a crash (Investigate!!)
+ testClasses.remove(XATransactionTest.class);
+ }
+ protected abstract boolean hasBranchingSupport();
- }
+ protected abstract boolean hasAuditSupport();
}
diff --git a/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/ObjyStoreQueryTest.java b/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/ObjyStoreQueryTest.java
index b90c9776ea..8618452c26 100644
--- a/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/ObjyStoreQueryTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/ObjyStoreQueryTest.java
@@ -12,18 +12,17 @@
package org.eclipse.emf.cdo.tests.objectivity;
import org.eclipse.emf.cdo.eresource.CDOResource;
-import org.eclipse.emf.cdo.internal.server.Repository;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.tests.AbstractCDOTest;
import org.eclipse.emf.cdo.tests.model1.Category;
import org.eclipse.emf.cdo.tests.model1.Company;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.util.CommitException;
import org.eclipse.emf.cdo.view.CDOQuery;
import org.eclipse.emf.internal.cdo.query.CDOQueryResultIteratorImpl;
import org.eclipse.net4j.util.collection.CloseableIterator;
-import org.eclipse.net4j.util.tests.AbstractOMTest.PollingTimeOuter;
import java.util.HashSet;
import java.util.List;
@@ -36,7 +35,7 @@ public class ObjyStoreQueryTest extends AbstractCDOTest
{
public void testObjyStoreBasicQuery() throws Exception
{
- //skipUnlessConfig(MEM);
+ // skipUnlessConfig(MEM);
Set<Object> objects = new HashSet<Object>();
CDOSession session = openSession();
@@ -71,7 +70,7 @@ public class ObjyStoreQueryTest extends AbstractCDOTest
public void testObjyStoreBasicQuery_EClassParameter() throws Exception
{
- //skipUnlessConfig(MEM);
+ // skipUnlessConfig(MEM);
Set<Object> objects = new HashSet<Object>();
CDOSession session = openSession();
@@ -106,53 +105,53 @@ public class ObjyStoreQueryTest extends AbstractCDOTest
public void testObjyStoreQueryCancel_successful() throws Exception
{
- //skipUnlessConfig(MEM);
-
- CDOTransaction transaction = initialize(500);
- CDOQuery query = transaction.createQuery("TEST", "QUERYSTRING");
- query.setParameter("sleep", 1000L);
- final CloseableIterator<Object> result = query.getResultAsync(Object.class);
- result.close();
-
- new PollingTimeOuter()
- {
- @Override
- protected boolean successful()
- {
- return !getRepository().getQueryManager().isRunning(((CDOQueryResultIteratorImpl<?>)result).getQueryID());
- }
- }.assertNoTimeOut();
-
- CDOSession session = transaction.getSession();
- transaction.close();
- session.close();
+ // skipUnlessConfig(MEM);
+
+ CDOTransaction transaction = initialize(500);
+ CDOQuery query = transaction.createQuery("TEST", "QUERYSTRING");
+ query.setParameter("sleep", 1000L);
+ final CloseableIterator<Object> result = query.getResultAsync(Object.class);
+ result.close();
+
+ new PollingTimeOuter()
+ {
+ @Override
+ protected boolean successful()
+ {
+ return !getRepository().getQueryManager().isRunning(((CDOQueryResultIteratorImpl<?>)result).getQueryID());
+ }
+ }.assertNoTimeOut();
+
+ CDOSession session = transaction.getSession();
+ transaction.close();
+ session.close();
}
public void testObjyStoreQueryCancel_ViewClose() throws Exception
{
- //skipUnlessConfig(MEM);
-
- CDOTransaction transaction = initialize(500);
- CDOQuery query = transaction.createQuery("TEST", "QUERYSTRING");
- query.setParameter("sleep", 1000L);
- final CloseableIterator<Object> result = query.getResultAsync(Object.class);
- CDOSession session = transaction.getSession();
- transaction.close();
- new PollingTimeOuter()
- {
- @Override
- protected boolean successful()
- {
- return !getRepository().getQueryManager().isRunning(((CDOQueryResultIteratorImpl<?>)result).getQueryID());
- }
- }.assertNoTimeOut();
-
- session.close();
+ // skipUnlessConfig(MEM);
+
+ CDOTransaction transaction = initialize(500);
+ CDOQuery query = transaction.createQuery("TEST", "QUERYSTRING");
+ query.setParameter("sleep", 1000L);
+ final CloseableIterator<Object> result = query.getResultAsync(Object.class);
+ CDOSession session = transaction.getSession();
+ transaction.close();
+ new PollingTimeOuter()
+ {
+ @Override
+ protected boolean successful()
+ {
+ return !getRepository().getQueryManager().isRunning(((CDOQueryResultIteratorImpl<?>)result).getQueryID());
+ }
+ }.assertNoTimeOut();
+
+ session.close();
}
public void testObjyStoreQueryCancel_SessionClose() throws Exception
{
- //skipUnlessConfig(MEM);
+ // skipUnlessConfig(MEM);
CDOTransaction transaction = initialize(500);
CDOQuery query = transaction.createQuery("TEST", "QUERYSTRING");
@@ -213,7 +212,14 @@ public class ObjyStoreQueryTest extends AbstractCDOTest
resource1.getContents().add(category1);
}
- transaction.commit();
+ try
+ {
+ transaction.commit();
+ }
+ catch (CommitException ex)
+ {
+ ex.printStackTrace();
+ }
return transaction;
}
}
diff --git a/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/ObjyStoreRepositoryConfig.java b/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/ObjyStoreRepositoryConfig.java
index 9f2f90c408..c1417be10a 100644
--- a/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/ObjyStoreRepositoryConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/ObjyStoreRepositoryConfig.java
@@ -1,74 +1,48 @@
package org.eclipse.emf.cdo.tests.objectivity;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.emf.cdo.server.CDOServerUtil;
-import org.eclipse.emf.cdo.server.IRepository;
-import org.eclipse.emf.cdo.server.IRepositoryProvider;
import org.eclipse.emf.cdo.server.IStore;
-import org.eclipse.emf.cdo.server.IRepository.Props;
import org.eclipse.emf.cdo.server.internal.objectivity.ObjectivityStoreConfig;
import org.eclipse.emf.cdo.server.objectivity.ObjyStoreUtil;
import org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig;
-import org.eclipse.net4j.util.container.IManagedContainer;
-import org.eclipse.net4j.util.lifecycle.Lifecycle;
-import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
/**
* @author Eike Stepper
*/
-public class ObjyStoreRepositoryConfig extends RepositoryConfig
+public abstract class ObjyStoreRepositoryConfig extends RepositoryConfig
{
private static final long serialVersionUID = 1L;
- public static ObjyStoreRepositoryConfig INSTANCE = new ObjyStoreRepositoryConfig();
- private static ObjectivityStoreConfig storeConfig = new ObjectivityStoreConfig();
- public ObjyStoreRepositoryConfig()
+ private static ObjectivityStoreConfig storeConfig = new ObjectivityStoreConfig();
+
+ public ObjyStoreRepositoryConfig(String name)
{
- super("Objectivity");
- org.eclipse.emf.cdo.server.internal.objectivity.bundle.OM.DEBUG.setEnabled(true);
- org.eclipse.emf.cdo.server.internal.objectivity.bundle.OM.INFO.setEnabled(true);
+ super(name);
}
-
+
@Override
public void setUp() throws Exception
{
- // define the store config before we call super.setUp() -> it will createStore()
- //storeConfig = new ObjectivityStoreConfig(this.getCurrentTest().getName());
-// storeConfig = new ObjectivityStoreConfig();
-// LifecycleUtil.activate(storeConfig);
- System.out.println("ObjyStoreRepositry.setup() - STARTED");
- long sTime = System.currentTimeMillis();
+ // System.out.println("ObjyStoreRepositry.setup() - STARTED");
+ // long sTime = System.currentTimeMillis();
super.setUp();
- long eTime = System.currentTimeMillis();
- System.out.println("ObjyStoreRepositry.setup() time: " + (eTime - sTime));
+ // long eTime = System.currentTimeMillis();
+ // System.out.println("ObjyStoreRepositry.setup() time: " + (eTime - sTime));
}
@Override
public void tearDown() throws Exception
{
super.tearDown();
- //System.out.println(">>>>IS:<<<< We need to remove all data created here....");
+ // System.out.println(">>>>IS:<<<< We need to remove all data created here....");
storeConfig.resetFD();
- //LifecycleUtil.deactivate(storeConfig);
}
- @Override
- protected IStore createStore(String repoName) {
- // We might need to use the repoName to our advantage!!!
- System.out.println("************* ObjyStore creation ****************\n");
- return ObjyStoreUtil.createStore(storeConfig);
- }
+ @Override
+ protected IStore createStore(String repoName)
+ {
+ // We might need to use the repoName to our advantage!!!
+ System.out.println("************* ObjyStore creation ****************\n");
+ return ObjyStoreUtil.createStore(storeConfig);
+ }
- /***
- * TODO - enable auditing and branching once we implement them!!!
- */
- @Override
- protected void initRepositoryProperties(Map<String, String> props)
- {
- super.initRepositoryProperties(props);
- props.put(Props.SUPPORTING_AUDITS, "false");
- props.put(Props.SUPPORTING_BRANCHES, "false");
- }
}
diff --git a/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/SampleTestsObjy.java b/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/SampleTestsObjy.java
new file mode 100644
index 0000000000..a0e4900006
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/SampleTestsObjy.java
@@ -0,0 +1,157 @@
+/**
+ * Copyright (c) 2004 - 2009 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.objectivity;
+
+import org.eclipse.emf.cdo.server.IRepository;
+import org.eclipse.emf.cdo.tests.AuditTest;
+import org.eclipse.emf.cdo.tests.AuditTestSameSession;
+import org.eclipse.emf.cdo.tests.BranchingTest;
+import org.eclipse.emf.cdo.tests.BranchingTestSameSession;
+import org.eclipse.emf.cdo.tests.ChunkingTest;
+import org.eclipse.emf.cdo.tests.ChunkingWithMEMTest;
+import org.eclipse.emf.cdo.tests.CommitInfoTest;
+import org.eclipse.emf.cdo.tests.DetachTest;
+import org.eclipse.emf.cdo.tests.ExternalReferenceTest;
+import org.eclipse.emf.cdo.tests.InvalidationTest;
+import org.eclipse.emf.cdo.tests.LockingManagerTest;
+import org.eclipse.emf.cdo.tests.MergingTest;
+import org.eclipse.emf.cdo.tests.PushTransactionTest;
+import org.eclipse.emf.cdo.tests.RepositoryTest;
+import org.eclipse.emf.cdo.tests.ResourceTest;
+import org.eclipse.emf.cdo.tests.UnsetTest;
+import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_248124_Test;
+import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_258933_Test;
+import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_259869_Test;
+import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_259949_Test;
+import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_272861_Test;
+import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_279982_Test;
+import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_298561_Test;
+import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_302233_Test;
+import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_303807_Test;
+import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_306998_Test;
+import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_308895_Test;
+import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_314264_Test;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest;
+
+import java.util.List;
+import java.util.Map;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author Eike Stepper
+ */
+public class SampleTestsObjy extends ObjyDBConfigs
+{
+ public static Test suite()
+ {
+ return new SampleTestsObjy().getTestSuite("CDO Tests (DBStoreRepositoryConfig Objectivity/DB)");
+ }
+
+ @Override
+ protected void initConfigSuites(TestSuite parent)
+ {
+ ObjyStoreRepositoryConfig repConfig = ObjySampleConfig.INSTANCE;
+ addScenario(parent, COMBINED, repConfig, JVM, NATIVE);
+ }
+
+ @Override
+ protected void initTestClasses(List<Class<? extends ConfigTest>> testClasses)
+ {
+ // super.initTestClasses(testClasses);
+ // testClasses.remove(XATransactionTest.class);
+
+ testClasses.clear();
+
+ // testClasses.add(ComplexTest.class);
+ // testClasses.add(AttributeTest.class);
+ testClasses.add(UnsetTest.class);
+ testClasses.add(BranchingTest.class);
+ testClasses.add(BranchingTestSameSession.class);
+ testClasses.add(MergingTest.class);
+ testClasses.add(PushTransactionTest.class);
+ testClasses.add(CommitInfoTest.class);
+ testClasses.add(AuditTest.class);
+ testClasses.add(AuditTestSameSession.class);
+ testClasses.add(ResourceTest.class);
+ testClasses.add(InvalidationTest.class);
+ testClasses.add(ChunkingTest.class);
+ testClasses.add(ChunkingWithMEMTest.class);
+ testClasses.add(DetachTest.class);
+ testClasses.add(ExternalReferenceTest.class);
+ // testClasses.add(XATransactionTest.class);
+ testClasses.add(RepositoryTest.class);
+ testClasses.add(LockingManagerTest.class);
+ testClasses.add(Bugzilla_248124_Test.class);
+ testClasses.add(Bugzilla_258933_Test.class);
+ testClasses.add(Bugzilla_259869_Test.class);
+ testClasses.add(Bugzilla_259949_Test.class);
+ testClasses.add(Bugzilla_272861_Test.class);
+ testClasses.add(Bugzilla_279982_Test.class);
+ testClasses.add(Bugzilla_298561_Test.class);
+ testClasses.add(Bugzilla_302233_Test.class);
+ testClasses.add(Bugzilla_303807_Test.class);
+ testClasses.add(Bugzilla_306998_Test.class);
+ testClasses.add(Bugzilla_308895_Test.class);
+ testClasses.add(Bugzilla_314264_Test.class);
+
+ // testClasses.add(LockingManagerTest.class);
+ // testClasses.add(MapTest.class);
+ // testClasses.add(FeatureMapTest.class);
+ // testClasses.add(AdapterManagerTest.class);
+ // testClasses.add(ConflictResolverTest.class);
+ // testClasses.add(DynamicXSDTest.class);
+ // testClasses.add(SetFeatureTest.class);
+ // testClasses.add(DynamicPackageTest.class);
+ // testClasses.add(LegacyTest.class);
+ // testClasses.add(Bugzilla_250757_Test.class);
+ // testClasses.add(Bugzilla_252909_Test.class);
+ // testClasses.add(Bugzilla_259949_Test.class);
+ // testClasses.add(Bugzilla_261218_Test.class);
+ }
+
+ @Override
+ protected boolean hasBranchingSupport()
+ {
+ return true;
+ }
+
+ @Override
+ protected boolean hasAuditSupport()
+ {
+ return true;
+ }
+
+ public static class ObjySampleConfig extends ObjyStoreRepositoryConfig
+ {
+ private static final long serialVersionUID = 1L;
+
+ public static final SampleTestsObjy.ObjySampleConfig INSTANCE = new ObjySampleConfig("ObjectivityStore: (sample)"); //$NON-NLS-1$
+
+ public ObjySampleConfig(String name)
+ {
+ super(name);
+
+ 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 void initRepositoryProperties(Map<String, String> props)
+ {
+ super.initRepositoryProperties(props);
+ props.put(IRepository.Props.SUPPORTING_AUDITS, "true");
+ props.put(IRepository.Props.SUPPORTING_BRANCHES, "true");
+ }
+ }
+
+}

Back to the top