jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1505907 - /jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/NodeTypeTest.java
Date Tue, 23 Jul 2013 06:16:18 GMT
Author: reschke
Date: Tue Jul 23 06:16:18 2013
New Revision: 1505907

URL: http://svn.apache.org/r1505907
Log:
JCR-3626: avoid full traversal of version storage in test case

Modified:
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/NodeTypeTest.java

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/NodeTypeTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/NodeTypeTest.java?rev=1505907&r1=1505906&r2=1505907&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/NodeTypeTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/NodeTypeTest.java
Tue Jul 23 06:16:18 2013
@@ -439,9 +439,22 @@ public class NodeTypeTest extends Abstra
 
         }
 
+        Node skippedFolder = null;
         NodeIterator nodes = node.getNodes();
         while (nodes.hasNext()) {
-            Node returnedNode = locateNodeWithPrimaryItem(nodes.nextNode());
+            Node testNode = nodes.nextNode();
+            if (testNode.getPath().equals("/jcr:system")) {
+                skippedFolder = testNode;
+            } else {
+                Node returnedNode = locateNodeWithPrimaryItem(testNode);
+                if (returnedNode != null) {
+                    return returnedNode;
+                }
+            }
+        }
+        // check jcr:system if we skipped it before
+        if (skippedFolder != null) {
+            Node returnedNode = locateNodeWithPrimaryItem(skippedFolder);
             if (returnedNode != null) {
                 return returnedNode;
             }



Mime
View raw message