jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1221693 - /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.java
Date Wed, 21 Dec 2011 12:21:33 GMT
Author: mduerig
Date: Wed Dec 21 12:21:33 2011
New Revision: 1221693

URL: http://svn.apache.org/viewvc?rev=1221693&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP)
test: large child node list (WIP, currently blocked on Microkernel)

Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.java

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.java?rev=1221693&r1=1221692&r2=1221693&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.java
Wed Dec 21 12:21:33 2011
@@ -87,6 +87,7 @@ import static org.junit.Assert.fail;
 
 public class RepositoryTest {
     private static final String BASE_URL = "fs:target/repository-test/repository";
+//    private static final String BASE_URL = "mem:fs:target/temp";
     private static long counter = System.currentTimeMillis();
 
     private final String testNode = "node_" + System.currentTimeMillis();
@@ -148,7 +149,11 @@ public class RepositoryTest {
                             "\"{}mvProp\":[1,2,3]}, " +
                             "\"{}bar\" : {}}", head, "{}");
 
-            mk.commit("/default", "+\"{}" + testNode + "\" : {" + ptUnstructured + '}', head,
"{}");
+            head = mk.commit("/default", "+\"{}" + testNode + "\" : {" + ptUnstructured +
'}', head, "{}");
+
+            if (mk.nodeExists("/:root/head/config", head)) {
+                mk.commit("/:root/head/config", "^ \"maxMemoryChildren\":2000", head, "");
+            }
         }
         finally {
             mk.dispose();
@@ -162,6 +167,34 @@ public class RepositoryTest {
             session = null;
         }
     }
+    
+    @Test
+    @Ignore  // todo work in progress. Currently there is not sufficient support for this
in the Microkernel
+    public void largeNodeList() throws RepositoryException {
+        Node node = getNode(testPath);
+        
+        for (int i = 0; i < 2002; i++) {
+//            for (int j = 0; j < 1; j++) {
+//                node.addNode("(" + i + ',' + j + ')');
+                node.addNode(String.valueOf(i));
+//            }
+            System.out.println(i);
+            node.getSession().save();
+        }
+        
+        Session session = getRepository().login();
+        try {
+            Node node2 = session.getNode(testPath);
+            NodeIterator childNodes = node2.getNodes();
+            while (childNodes.hasNext()) {
+                Node child = childNodes.nextNode();
+                System.out.println(child.getPath());
+            }
+        }
+        finally {
+            session.logout();
+        }
+    }
 
     @Test
     public void createRepository() throws RepositoryException {



Mime
View raw message