jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r1402082 - /jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
Date Thu, 25 Oct 2012 10:22:32 GMT
Author: mreutegg
Date: Thu Oct 25 10:22:31 2012
New Revision: 1402082

URL: http://svn.apache.org/viewvc?rev=1402082&view=rev
Log:
OAK-398: Moving referenceable node fails with 'Uniqueness constraint violated' 

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

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java?rev=1402082&r1=1402081&r2=1402082&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
Thu Oct 25 10:22:31 2012
@@ -1374,6 +1374,32 @@ public class RepositoryTest extends Abst
     }
 
     @Test
+    @Ignore("OAK-398")
+    public void moveReferenceable() throws RepositoryException {
+        Session session = getAdminSession();
+
+        Node node = getNode(TEST_PATH);
+        node.addNode("source").addNode("node").addMixin("mix:referenceable");
+        node.addNode("target");
+        session.save();
+
+        Node sourceNode = session.getNode(TEST_PATH + "/source/node");
+        session.refresh(true);
+        session.move(TEST_PATH + "/source/node", TEST_PATH + "/target/moved");
+        assertEquals("/test_node/target/moved", sourceNode.getPath());
+
+        assertFalse(node.hasNode("source/node"));
+        assertTrue(node.hasNode("source"));
+        assertTrue(node.hasNode("target/moved"));
+
+        session.save();
+
+        assertFalse(node.hasNode("source/node"));
+        assertTrue(node.hasNode("source"));
+        assertTrue(node.hasNode("target/moved"));
+    }
+
+    @Test
     public void workspaceMove() throws RepositoryException {
         Session session = getAdminSession();
 



Mime
View raw message