jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1505915 - in /jackrabbit/branches/2.6: ./ jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/NodeTypeTest.java
Date Tue, 23 Jul 2013 06:48:56 GMT
Author: reschke
Date: Tue Jul 23 06:48:56 2013
New Revision: 1505915

URL: http://svn.apache.org/r1505915
Log:
JCR-3626: avoid full traversal of version storage in test case (ported to 2.6)

Modified:
    jackrabbit/branches/2.6/   (props changed)
    jackrabbit/branches/2.6/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/NodeTypeTest.java

Propchange: jackrabbit/branches/2.6/
------------------------------------------------------------------------------
  Merged /jackrabbit/trunk:r1505907

Modified: jackrabbit/branches/2.6/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/NodeTypeTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.6/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/NodeTypeTest.java?rev=1505915&r1=1505914&r2=1505915&view=diff
==============================================================================
--- jackrabbit/branches/2.6/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/NodeTypeTest.java
(original)
+++ jackrabbit/branches/2.6/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/NodeTypeTest.java
Tue Jul 23 06:48:56 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