jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r1585655 - /jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/NodeStoreFixture.java
Date Tue, 08 Apr 2014 07:39:32 GMT
Author: mreutegg
Date: Tue Apr  8 07:39:31 2014
New Revision: 1585655

URL: http://svn.apache.org/r1585655
Log:
OAK-1691: Use in-memory DB for DOCUMENT_JDBC fixture

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/NodeStoreFixture.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/NodeStoreFixture.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/NodeStoreFixture.java?rev=1585655&r1=1585654&r2=1585655&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/NodeStoreFixture.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/NodeStoreFixture.java
Tue Apr  8 07:39:31 2014
@@ -19,7 +19,6 @@
 package org.apache.jackrabbit.oak.jcr;
 
 import java.io.Closeable;
-import java.io.File;
 import java.io.IOException;
 import java.util.UUID;
 
@@ -84,16 +83,14 @@ public abstract class NodeStoreFixture {
         @Override
         public NodeStore createNodeStore() {
             String id = UUID.randomUUID().toString();
-            String folder = (new File("target")).isDirectory() ? "target/" : "";
-            DataSource ds = RDBDataSourceFactory.forJdbcUrl("jdbc:h2:file:" + folder + id
+ ";MVCC=true", "sa", "");
+            DataSource ds = RDBDataSourceFactory.forJdbcUrl("jdbc:h2:mem:" + id + ";MVCC=true",
"sa", "");
             return new DocumentMK.Builder().setRDBConnection(ds).getNodeStore();
         }
 
         @Override
         public NodeStore createNodeStore(int clusterNodeId) {
             try {
-                String folder = (new File("target")).isDirectory() ? "target/" : "";
-                DataSource ds = RDBDataSourceFactory.forJdbcUrl("jdbc:h2:file:" + folder
+ "oaknodes-" + clusterNodeId, "sa", "");
+                DataSource ds = RDBDataSourceFactory.forJdbcUrl("jdbc:h2:mem:oaknodes-" +
clusterNodeId, "sa", "");
                 return new DocumentMK.Builder().setRDBConnection(ds).getNodeStore();
             } catch (Exception e) {
                 return null;



Mime
View raw message