jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1361184 - in /jackrabbit/trunk: jackrabbit-core/pom.xml jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/RestoreTest.java
Date Fri, 13 Jul 2012 12:33:37 GMT
Author: reschke
Date: Fri Jul 13 12:33:37 2012
New Revision: 1361184

URL: http://svn.apache.org/viewvc?rev=1361184&view=rev
Log:
JCR-2666: JCR TCK Test for Restoring Version Tests That Versionable Child Is also Restored,
contrary to JCR 2.0 specification

Modified:
    jackrabbit/trunk/jackrabbit-core/pom.xml
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/RestoreTest.java

Modified: jackrabbit/trunk/jackrabbit-core/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/pom.xml?rev=1361184&r1=1361183&r2=1361184&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/pom.xml (original)
+++ jackrabbit/trunk/jackrabbit-core/pom.xml Fri Jul 13 12:33:37 2012
@@ -111,6 +111,7 @@ org.apache.jackrabbit.test.api.Shareable
 org.apache.jackrabbit.test.api.lock.OpenScopedLockTest#testLockExpiration
 org.apache.jackrabbit.test.api.lock.SessionScopedLockTest#testLockExpiration
 org.apache.jackrabbit.test.api.observation.NodeReorderTest#testNodeReorderMove
+org.apache.jackrabbit.test.api.version.RestoreTest#testRestoreNameJcr2<!--JCR-3326-->

 org.apache.jackrabbit.core.data.ConcurrentGcTest#testDatabases
 org.apache.jackrabbit.core.data.GarbageCollectorTest#testCloseSessionWhileRunningGc
               </value>

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/RestoreTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/RestoreTest.java?rev=1361184&r1=1361183&r2=1361184&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/RestoreTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/RestoreTest.java
Fri Jul 13 12:33:37 2012
@@ -974,7 +974,7 @@ public class RestoreTest extends Abstrac
 
         // create V1.1 of child
         child1.checkout();
-        Version v11Child = child1.checkin();
+        child1.checkin();
 
         // V2 of versionable node has child1
         versionableNode.checkout();
@@ -1018,14 +1018,14 @@ public class RestoreTest extends Abstrac
         ensureMixinType(child1, mixVersionable);
         versionableNode.getSession().save();
         // create v1.0 of child
-        Version v1Child = child1.checkin();
+        Version v1Child = versionManager.checkin(child1.getPath());
 
         // V1 of versionable node has child1
         String v1 = versionManager.checkin(versionableNode.getPath()).getName();
 
         // create V1.1 of child
         versionManager.checkout(child1.getPath());
-        Version v11Child = versionManager.checkin(child1.getPath());
+        versionManager.checkin(child1.getPath());
 
         // V2 of versionable node has child1
         versionManager.checkout(versionableNode.getPath());
@@ -1041,10 +1041,15 @@ public class RestoreTest extends Abstrac
         child1 = versionableNode.getNode(nodeName4);
         assertEquals("restore must restore child node version 1.0.", v1Child.getName(), versionManager.getBaseVersion(child1.getPath()).getName());
 
-        // restore V2 via name. child should be 1.1
+        // JSR283 is more clear about restoring versionable OPV=VERSION nodes
+        // and states that an existing one is not restored when the parent
+        // is restored (see 15.7.5 Chained Versions on Restore)
+
+        // New JSR283 version:
+        // restore V2 via name. child should still be be 1.0
         versionManager.restore(versionableNode.getPath(), v2, true);
         child1 = versionableNode.getNode(nodeName4);
-        assertEquals("Node.restore('foo') must restore child node version 1.1.", v11Child.getName(),
versionManager.getBaseVersion(child1.getPath()).getName());
+        assertEquals("Node.restore('foo') must not restore child node and keep version 1.0.",
v1Child.getName(), versionManager.getBaseVersion(child1.getPath()).getName());
     }
 
     /**



Mime
View raw message