Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--features/org.eclipse.emf.cdo.server.mongodb-feature/feature.properties2
-rw-r--r--features/org.eclipse.emf.cdo.site-feature/feature.xml4
-rw-r--r--features/org.eclipse.emf.cdo.tests-feature/feature.xml7
-rw-r--r--plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/Commits.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PartialCommitTest.java23
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_316444_Test.java16
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_320690_Test.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_327604_Test.java16
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/AbstractOMTest.java16
-rw-r--r--releng/org.eclipse.emf.cdo.releng/buckminster.cspec2
10 files changed, 64 insertions, 31 deletions
diff --git a/features/org.eclipse.emf.cdo.server.mongodb-feature/feature.properties b/features/org.eclipse.emf.cdo.server.mongodb-feature/feature.properties
index 74f2463ef1..dca5091aa5 100644
--- a/features/org.eclipse.emf.cdo.server.mongodb-feature/feature.properties
+++ b/features/org.eclipse.emf.cdo.server.mongodb-feature/feature.properties
@@ -18,7 +18,7 @@
providerName = Eclipse Modeling Project
featureName = CDO Model Repository Server MongoDB
-description = Contains the MongoDBStore plugins.
+description = Contains the MongoDBStore plugins. Ensure that a MongoDB Java driver is already installed! Visit http://net4j.sourceforge.net/update for a p2 repository that contains a MongoDB Java driver.
copyrightURL = copyright.txt
copyright = Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.\n\
diff --git a/features/org.eclipse.emf.cdo.site-feature/feature.xml b/features/org.eclipse.emf.cdo.site-feature/feature.xml
index aeefd052ee..d70dc7a2c1 100644
--- a/features/org.eclipse.emf.cdo.site-feature/feature.xml
+++ b/features/org.eclipse.emf.cdo.site-feature/feature.xml
@@ -85,6 +85,10 @@
version="0.0.0"/>
<includes
+ id="org.eclipse.emf.cdo.server.mongodb"
+ version="0.0.0"/>
+
+ <includes
id="org.eclipse.emf.cdo.tests"
version="0.0.0"/>
diff --git a/features/org.eclipse.emf.cdo.tests-feature/feature.xml b/features/org.eclipse.emf.cdo.tests-feature/feature.xml
index 22de912782..805e91fa66 100644
--- a/features/org.eclipse.emf.cdo.tests-feature/feature.xml
+++ b/features/org.eclipse.emf.cdo.tests-feature/feature.xml
@@ -51,6 +51,13 @@
unpack="false"/>
<plugin
+ id="org.eclipse.emf.cdo.tests.mongodb"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
id="org.eclipse.emf.cdo.tests.db4o"
download-size="0"
install-size="0"
diff --git a/plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/Commits.java b/plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/Commits.java
index 6211d32199..8236469e61 100644
--- a/plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/Commits.java
+++ b/plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/Commits.java
@@ -591,9 +591,15 @@ public class Commits extends Coll
{
long revised = result - 1;
- // TODO Cache REVISIONS_REVISED
+ // try
+ // {
// revision.put(REVISIONS_REVISED, revised);
// collection.save(doc);
+ // }
+ // catch (Exception ex)
+ // {
+ // OM.LOG.warn(ex);
+ // }
return revised;
}
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 f09df2b284..2c2ceec8f2 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
@@ -85,15 +85,6 @@ public class PartialCommitTest extends AbstractCDOTest
private MultiNonContainedElement multiNonContainedElement1, multiNonContainedElement2;
@Override
- public void setUp() throws Exception
- {
- super.setUp();
- session = openSession();
- session.options().setPassiveUpdateEnabled(false);
- tx = (InternalCDOTransaction)session.openTransaction();
- }
-
- @Override
public synchronized Map<String, Object> getTestProperties()
{
Map<String, Object> map = super.getTestProperties();
@@ -102,11 +93,21 @@ public class PartialCommitTest extends AbstractCDOTest
}
@Override
- public void tearDown() throws Exception
+ protected void doSetUp() throws Exception
+ {
+ super.doSetUp();
+
+ session = openSession();
+ session.options().setPassiveUpdateEnabled(false);
+ tx = (InternalCDOTransaction)session.openTransaction();
+ }
+
+ @Override
+ protected void doTearDown() throws Exception
{
tx.close();
session.close();
- super.tearDown();
+ super.doTearDown();
}
public void testNewTopLevelResource() throws CommitException
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_316444_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_316444_Test.java
index b3e03448b1..3c5c04a4dd 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_316444_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_316444_Test.java
@@ -59,6 +59,14 @@ public class Bugzilla_316444_Test extends AbstractCDOTest
private List<Exception> exceptions = new ArrayList<Exception>();
@Override
+ public synchronized Map<String, Object> getTestProperties()
+ {
+ Map<String, Object> map = super.getTestProperties();
+ map.put(IRepository.Props.ENSURE_REFERENTIAL_INTEGRITY, "true");
+ return map;
+ }
+
+ @Override
protected void doSetUp() throws Exception
{
createRepository();
@@ -153,14 +161,6 @@ public class Bugzilla_316444_Test extends AbstractCDOTest
map.put(RepositoryConfig.PROP_TEST_REPOSITORY, repository);
}
- @Override
- public synchronized Map<String, Object> getTestProperties()
- {
- Map<String, Object> map = super.getTestProperties();
- map.put(IRepository.Props.ENSURE_REFERENTIAL_INTEGRITY, "true");
- return map;
- }
-
public void testMovingSubtree() throws Exception
{
exceptions.clear();
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 f0d0ec82b4..b9fbc80af6 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
@@ -118,7 +118,6 @@ public class Bugzilla_320690_Test extends AbstractCDOTest
public void testDeleteTargetAndReferenceAtOnce() throws Exception
{
skipQueryXRefs();
-
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_327604_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_327604_Test.java
index 9746749769..7373c0f3e8 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
@@ -85,6 +85,14 @@ public class Bugzilla_327604_Test extends AbstractCDOTest
private IStore localStore;
@Override
+ public synchronized Map<String, Object> getTestProperties()
+ {
+ Map<String, Object> map = super.getTestProperties();
+ map.put(IRepository.Props.ENSURE_REFERENTIAL_INTEGRITY, "false");
+ return map;
+ }
+
+ @Override
protected void doSetUp() throws Exception
{
disableConsole();
@@ -126,14 +134,6 @@ public class Bugzilla_327604_Test extends AbstractCDOTest
super.doTearDown();
}
- @Override
- public synchronized Map<String, Object> getTestProperties()
- {
- Map<String, Object> map = super.getTestProperties();
- map.put(IRepository.Props.ENSURE_REFERENTIAL_INTEGRITY, "false");
- return map;
- }
-
public void testReadObjects() throws Exception
{
skipHandleRevisions();
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/AbstractOMTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/AbstractOMTest.java
index a899f11da6..e8a41888c9 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/AbstractOMTest.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/AbstractOMTest.java
@@ -23,6 +23,7 @@ import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
import org.eclipse.net4j.util.om.OMPlatform;
import org.eclipse.net4j.util.om.log.FileLogHandler;
import org.eclipse.net4j.util.om.log.OMLogger;
+import org.eclipse.net4j.util.om.log.OMLogger.Level;
import org.eclipse.net4j.util.om.log.PrintLogHandler;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.om.trace.PrintTraceHandler;
@@ -61,6 +62,8 @@ public abstract class AbstractOMTest extends TestCase
private static boolean consoleEnabled;
+ private static String testName;
+
private transient List<File> filesToDelete = new ArrayList<File>();
private transient String codeLink;
@@ -74,7 +77,16 @@ public abstract class AbstractOMTest extends TestCase
SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss");
String prefix = AbstractOMTest.class.getName() + "-" + formatter.format(new Date()) + "-";
File logFile = TMPUtil.createTempFile(prefix, ".log");
- OMPlatform.INSTANCE.addLogHandler(new FileLogHandler(logFile, OMLogger.Level.WARN));
+
+ OMPlatform.INSTANCE.addLogHandler(new FileLogHandler(logFile, OMLogger.Level.WARN)
+ {
+ @Override
+ protected void writeLog(OMLogger logger, Level level, String msg, Throwable t) throws Throwable
+ {
+ super.writeLog(logger, level, "--> " + testName + "\n" + msg, t);
+ }
+ });
+
IOUtil.ERR().println("Logging errors and warnings to " + logFile);
IOUtil.ERR().println();
}
@@ -128,7 +140,9 @@ public abstract class AbstractOMTest extends TestCase
@Override
public void setUp() throws Exception
{
+ testName = getClass().getName() + "." + getName() + "()";
codeLink = null;
+
enableConsole();
if (!SUPPRESS_OUTPUT)
{
diff --git a/releng/org.eclipse.emf.cdo.releng/buckminster.cspec b/releng/org.eclipse.emf.cdo.releng/buckminster.cspec
index d3e1cfdabf..05e98590e2 100644
--- a/releng/org.eclipse.emf.cdo.releng/buckminster.cspec
+++ b/releng/org.eclipse.emf.cdo.releng/buckminster.cspec
@@ -61,6 +61,8 @@
<cs:dependency name="org.hsqldb" componentType="eclipse.feature"/>
<cs:dependency name="org.postgresql.jdbc3" componentType="eclipse.feature"/>
<cs:dependency name="com.db4o" componentType="eclipse.feature"/>
+ <cs:dependency name="com.mongodb" componentType="eclipse.feature"/>
+ <cs:dependency name="com.mongodb.source" componentType="eclipse.feature"/>
<cs:dependency name="org.hibernate" componentType="eclipse.feature"/>
<cs:dependency name="org.dom4j" componentType="eclipse.feature"/>

Back to the top