jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1466376 - /jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/OakRepositoryFixture.java
Date Wed, 10 Apr 2013 08:24:21 GMT
Author: thomasm
Date: Wed Apr 10 08:24:21 2013
New Revision: 1466376

URL: http://svn.apache.org/r1466376
Log:
OAK-746 Builder for the MongoMK

Modified:
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/OakRepositoryFixture.java

Modified: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/OakRepositoryFixture.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/OakRepositoryFixture.java?rev=1466376&r1=1466375&r2=1466376&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/OakRepositoryFixture.java
(original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/OakRepositoryFixture.java
Wed Apr 10 08:24:21 2013
@@ -86,7 +86,9 @@ public abstract class OakRepositoryFixtu
                 for (int i = 0; i < cluster.length; i++) {
                     MongoConnection mongo =
                             new MongoConnection(host, port, unique);
-                    kernels[i] = new MongoMK(mongo.getDB(), i);
+                    kernels[i] = new MongoMK.Builder().
+                            setMongoDB(mongo.getDB()).
+                            setClusterId(i).open();
                     Oak oak = new Oak(new KernelNodeStore(kernels[i], cacheSize));
                     cluster[i] = new Jcr(oak).createRepository();
                 }
@@ -103,7 +105,7 @@ public abstract class OakRepositoryFixtu
                     mongo.getDB().dropDatabase();
                     mongo.close();
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    throw new RuntimeException(e);
                 }
             }
         };
@@ -155,6 +157,7 @@ public abstract class OakRepositoryFixtu
 
     @Override
     public void tearDownCluster() {
+        // nothing to do by default
     }
 
     @Override



Mime
View raw message