jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1485633 - /jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/ClusterTest.java
Date Thu, 23 May 2013 09:45:46 GMT
Author: thomasm
Date: Thu May 23 09:45:46 2013
New Revision: 1485633

URL: http://svn.apache.org/r1485633
Log:
OAK-762 MongoMK: revision ordering (WIP)

Modified:
    jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/ClusterTest.java

Modified: jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/ClusterTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/ClusterTest.java?rev=1485633&r1=1485632&r2=1485633&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/ClusterTest.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/ClusterTest.java
Thu May 23 09:45:46 2013
@@ -24,6 +24,7 @@ import org.apache.jackrabbit.mk.blobs.Me
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.Ignore;
 
 import com.mongodb.DB;
 
@@ -37,6 +38,46 @@ public class ClusterTest {
     
     private MemoryDocumentStore ds;
     private MemoryBlobStore bs;
+    
+    @Test
+    @Ignore
+    public void threeNodes() throws Exception {
+        MemoryDocumentStore ds = new MemoryDocumentStore();
+        MemoryBlobStore bs = new MemoryBlobStore();
+        MongoMK.Builder builder;
+        
+        builder = new MongoMK.Builder();
+        builder.setDocumentStore(ds).setBlobStore(bs);
+        MongoMK mk1 = builder.setClusterId(1).open();
+        builder = new MongoMK.Builder();
+        builder.setDocumentStore(ds).setBlobStore(bs);
+        MongoMK mk2 = builder.setClusterId(2).open();
+        builder = new MongoMK.Builder();
+        builder.setDocumentStore(ds).setBlobStore(bs);
+        MongoMK mk3 = builder.setClusterId(3).open();
+
+        String r1 = mk1.commit("/", "+\"test\":{}", null, null);
+
+        mk2.commit("/", "+\"a\":{}", null, null);
+        mk3.commit("/", "+\"b\":{}", null, null);
+        mk2.commit("/", "^\"test/x\":1", null, null);
+        mk3.commit("/", "^\"test/y\":2", null, null);
+
+        String r2 = mk1.commit("/", "^\"b/x\":1", null, null);
+        String r3 = mk1.commit("/", "^\"a/x\":1", null, null);
+        
+        String n1 = mk1.getNodes("/test", r1, 0, 0, 10, null);
+        String n2 = mk1.getNodes("/test", r2, 0, 0, 10, null);
+        String n3 = mk1.getNodes("/test", r3, 0, 0, 10, null);
+
+        System.out.println(n1);
+        System.out.println(n2);
+        System.out.println(n3);
+        
+        mk1.dispose();
+        mk2.dispose();
+        mk3.dispose();
+    }
 
     @Test
     public void clusterNodeInfoLease() throws InterruptedException {



Mime
View raw message