jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1502240 - /jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/MoveTest.java
Date Thu, 11 Jul 2013 15:00:28 GMT
Author: alexparvulescu
Date: Thu Jul 11 15:00:28 2013
New Revision: 1502240

URL: http://svn.apache.org/r1502240
Log:
OAK-898 Session#move with a fresh session doesn't work properly
 - test case (ignored)

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/MoveTest.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/MoveTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/MoveTest.java?rev=1502240&r1=1502239&r2=1502240&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/MoveTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/MoveTest.java
Thu Jul 11 15:00:28 2013
@@ -17,9 +17,11 @@
 package org.apache.jackrabbit.oak.jcr;
 
 import javax.jcr.Node;
+import javax.jcr.Session;
 
 import org.apache.jackrabbit.JcrConstants;
 import org.apache.jackrabbit.test.AbstractJCRTest;
+import org.junit.Ignore;
 import org.junit.Test;
 
 /**
@@ -67,6 +69,30 @@ public class MoveTest extends AbstractJC
         assertEquals(destPath, node1.getPath());
     }
 
+    /**
+     * Simulate a 'rename' call using 2 sessions:
+     * - 1st create a node that has a '.tmp' extension 
+     * - 2nd remove the '.tmp' by issuing a Session#move call on a fresh session
+     */
+    @Test
+    @Ignore("OAK-898")
+    public void testMoveTmp() throws Exception {
+        String n = "testMoveTmp";
+
+        Node node1 = testRootNode.addNode(n + ".tmp");
+        superuser.save();
+
+        String destPath = testRootNode.getPath() + "/" + n;
+
+        Session ts = getHelper().getSuperuserSession();
+        try {
+            ts.move(node1.getPath(), destPath);
+            assertEquals(destPath, node1.getPath());
+        } finally {
+            ts.logout();
+        }
+    }
+
     @Test
     public void testMoveReferenceable() throws Exception {
         Node node1 = testRootNode.addNode(nodeName1);



Mime
View raw message