jackrabbit-commits mailing list archives

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

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

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=1221755&r1=1221754&r2=1221755&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 15:04:28 2011
@@ -86,8 +86,12 @@ import static org.junit.Assert.assertTru
 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 final boolean USE_MEM_KERNEL = false;
+
+    private static final String BASE_URL = USE_MEM_KERNEL
+        ? "mem:fs:target/temp"
+        : "fs:target/repository-test/repository";
+
     private static long counter = System.currentTimeMillis();
 
     private final String testNode = "node_" + System.currentTimeMillis();
@@ -151,7 +155,7 @@ public class RepositoryTest {
 
             head = mk.commit("/default", "+\"{}" + testNode + "\" : {" + ptUnstructured +
'}', head, "{}");
 
-            if (mk.nodeExists("/:root/head/config", head)) {
+            if (USE_MEM_KERNEL) {
                 mk.commit("/:root/head/config", "^ \"maxMemoryChildren\":2000", head, "");
             }
         }
@@ -169,16 +173,18 @@ public class RepositoryTest {
     }
     
     @Test
-    @Ignore  // todo work in progress. Currently there is not sufficient support for this
in the Microkernel
+    @Ignore("WIP")
     public void largeNodeList() throws RepositoryException {
+        if (!USE_MEM_KERNEL) {
+            return;
+        }
+
         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);
+        for (int i = 0; i < 1000; i++) {
+            for (int j = 0; j < 100; j++) {
+                node.addNode("(" + i + ',' + j + ')');
+            }
             node.getSession().save();
         }
         
@@ -188,7 +194,6 @@ public class RepositoryTest {
             NodeIterator childNodes = node2.getNodes();
             while (childNodes.hasNext()) {
                 Node child = childNodes.nextNode();
-                System.out.println(child.getPath());
             }
         }
         finally {



Mime
View raw message