diff options
author | Victor Roldan Betancort | 2011-07-08 14:38:23 +0000 |
---|---|---|
committer | Victor Roldan Betancort | 2011-07-08 14:38:23 +0000 |
commit | 56c71208040fccf88cb611657eb0b87b9375527e (patch) | |
tree | f14c0e79ca406a917ee6aabb845f87a7b619933e | |
parent | 7bd5d720588075cb53d28244447ede5a02d324b7 (diff) | |
download | cdo-56c71208040fccf88cb611657eb0b87b9375527e.tar.gz cdo-56c71208040fccf88cb611657eb0b87b9375527e.tar.xz cdo-56c71208040fccf88cb611657eb0b87b9375527e.zip |
bug 349921: [DB4O] Create a test config using MEMDB4OStore
https://bugs.eclipse.org/bugs/show_bug.cgi?id=349921
5 files changed, 110 insertions, 43 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.db4o/.project b/plugins/org.eclipse.emf.cdo.tests.db4o/.project index fdf6656917..faac1284bd 100644 --- a/plugins/org.eclipse.emf.cdo.tests.db4o/.project +++ b/plugins/org.eclipse.emf.cdo.tests.db4o/.project @@ -20,9 +20,19 @@ <arguments> </arguments> </buildCommand> + <buildCommand> + <name>org.eclipse.emf.cdo.releng.version.VersionBuilder</name> + <arguments> + <dictionary> + <key>release.path</key> + <value>/org.eclipse.emf.cdo.releng/release.xml</value> + </dictionary> + </arguments> + </buildCommand> </buildSpec> <natures> <nature>org.eclipse.pde.PluginNature</nature> <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.emf.cdo.releng.version.VersionNature</nature> </natures> </projectDescription> diff --git a/plugins/org.eclipse.emf.cdo.tests.db4o/CDO AllTests (MEMDB4O).launch b/plugins/org.eclipse.emf.cdo.tests.db4o/CDO AllTests (MEMDB4O).launch new file mode 100644 index 0000000000..49a9e7a958 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests.db4o/CDO AllTests (MEMDB4O).launch @@ -0,0 +1,16 @@ +<?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.db4o/src/org/eclipse/emf/cdo/tests/db4o/AllTestsMEMDB4O.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<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.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.cdo.tests.db4o.AllTestsMEMDB4O"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.emf.cdo.tests.db4o"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-XX:MaxPermSize=128m"/>
+</launchConfiguration>
diff --git a/plugins/org.eclipse.emf.cdo.tests.db4o/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.tests.db4o/META-INF/MANIFEST.MF index cd8d50cbf2..61e1c89756 100644 --- a/plugins/org.eclipse.emf.cdo.tests.db4o/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.emf.cdo.tests.db4o/META-INF/MANIFEST.MF @@ -2,12 +2,12 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.emf.cdo.tests.db4o -Bundle-Version: 4.0.0.qualifier +Bundle-Version: 4.0.100.qualifier Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Require-Bundle: org.eclipse.emf.cdo.tests;bundle-version="3.0.0", - org.eclipse.emf.cdo.server.db4o;bundle-version="1.0.0" +Require-Bundle: org.eclipse.emf.cdo.tests;bundle-version="[4.0.0,5.0.0)", + org.eclipse.emf.cdo.server.db4o;bundle-version="[4.0.0,5.0.0)" Bundle-Vendor: %providerName -Export-Package: org.eclipse.emf.cdo.tests.db4o;version="1.0.0";x-internal:=true +Export-Package: org.eclipse.emf.cdo.tests.db4o;version="4.0.100";x-internal:=true Bundle-Localization: plugin Import-Package: com.db4o;version="[7.4.0,8.0.0)", com.db4o.ext;version="[7.4.0,8.0.0)" diff --git a/plugins/org.eclipse.emf.cdo.tests.db4o/src/org/eclipse/emf/cdo/tests/db4o/AllTestsDB4O.java b/plugins/org.eclipse.emf.cdo.tests.db4o/src/org/eclipse/emf/cdo/tests/db4o/AllTestsDB4O.java index 16e0a77a7c..80c441e18c 100644 --- a/plugins/org.eclipse.emf.cdo.tests.db4o/src/org/eclipse/emf/cdo/tests/db4o/AllTestsDB4O.java +++ b/plugins/org.eclipse.emf.cdo.tests.db4o/src/org/eclipse/emf/cdo/tests/db4o/AllTestsDB4O.java @@ -142,43 +142,4 @@ public class AllTestsDB4O extends AllConfigs return optimizing; } } - - public static class MemDB4ORepositoryConfig extends RepositoryConfig - { - public static final MemDB4ORepositoryConfig INSTANCE = new MemDB4ORepositoryConfig("DB4O"); - - private static final long serialVersionUID = 1L; - - private transient boolean optimizing = false; - - public MemDB4ORepositoryConfig(String name) - { - super(name); - } - - @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"); - } - - @Override - protected IStore createStore(String repoName) - { - if (!isRestarting()) - { - MEMDB4OStore.clearContainer(); - } - return new MEMDB4OStore(); - } - - @Override - protected boolean isOptimizing() - { - // Do NOT replace this with a hardcoded value! - return optimizing; - } - } } diff --git a/plugins/org.eclipse.emf.cdo.tests.db4o/src/org/eclipse/emf/cdo/tests/db4o/AllTestsMEMDB4O.java b/plugins/org.eclipse.emf.cdo.tests.db4o/src/org/eclipse/emf/cdo/tests/db4o/AllTestsMEMDB4O.java new file mode 100644 index 0000000000..64ccdb26fd --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests.db4o/src/org/eclipse/emf/cdo/tests/db4o/AllTestsMEMDB4O.java @@ -0,0 +1,80 @@ +package org.eclipse.emf.cdo.tests.db4o;
+
+import org.eclipse.emf.cdo.server.IRepository;
+import org.eclipse.emf.cdo.server.IStore;
+import org.eclipse.emf.cdo.tests.AllConfigs;
+import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_261218_Test;
+import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_324585_Test;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest;
+import org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig;
+
+import java.util.List;
+import java.util.Map;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllTestsMEMDB4O extends AllConfigs
+{
+
+ public static Test suite()
+ {
+ return new AllTestsMEMDB4O().getTestSuite("CDO Tests (MEMDB4O)");
+ }
+
+ @Override
+ protected void initTestClasses(List<Class<? extends ConfigTest>> testClasses)
+ {
+ super.initTestClasses(testClasses);
+
+ // Skipped because takes too much
+ testClasses.remove(Bugzilla_261218_Test.class);
+ testClasses.remove(Bugzilla_324585_Test.class);
+ }
+
+ @Override
+ protected void initConfigSuites(TestSuite parent)
+ {
+ addScenario(parent, COMBINED, MemDB4ORepositoryConfig.INSTANCE, JVM, NATIVE);
+ }
+
+ public static class MemDB4ORepositoryConfig extends RepositoryConfig
+ {
+ public static final MemDB4ORepositoryConfig INSTANCE = new MemDB4ORepositoryConfig("DB4O");
+
+ private static final long serialVersionUID = 1L;
+
+ private transient boolean optimizing = false;
+
+ public MemDB4ORepositoryConfig(String name)
+ {
+ super(name);
+ }
+
+ @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");
+ }
+
+ @Override
+ protected IStore createStore(String repoName)
+ {
+ if (!isRestarting())
+ {
+ MEMDB4OStore.clearContainer();
+ }
+ return new MEMDB4OStore();
+ }
+
+ @Override
+ protected boolean isOptimizing()
+ {
+ // Do NOT replace this with a hardcoded value!
+ return optimizing;
+ }
+ }
+
+}
|