jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1445636 - /jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/RootImplTest.java
Date Wed, 13 Feb 2013 14:49:47 GMT
Author: mduerig
Date: Wed Feb 13 14:49:47 2013
New Revision: 1445636

URL: http://svn.apache.org/r1445636
Log:
OAK-621: Moving tree instance with status NEW changes its status to EXISTING instead of DISCONNECTED
test case

Modified:
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/RootImplTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/RootImplTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/RootImplTest.java?rev=1445636&r1=1445635&r2=1445636&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/RootImplTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/RootImplTest.java
Wed Feb 13 14:49:47 2013
@@ -27,8 +27,10 @@ import org.apache.jackrabbit.oak.api.Con
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.Root;
 import org.apache.jackrabbit.oak.api.Tree;
+import org.apache.jackrabbit.oak.api.Tree.Status;
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -112,6 +114,21 @@ public class RootImplTest {
         assertTrue(tree.getChild("y").hasChild("xx"));
     }
 
+    @Test
+    @Ignore("OAK-621")
+    public void moveNew() throws CommitFailedException {
+        Root root = session.getLatestRoot();
+        Tree tree = root.getTree("/");
+
+        Tree t = tree.addChild("new");
+        assertEquals(Status.NEW, t.getStatus());
+
+        root.move("/x", "/y/x");
+        assertEquals(Status.DISCONNECTED, t.getStatus());
+
+        assertNull(tree.getChild("new"));
+    }
+
     /**
      * Regression test for OAK-208
      */



Mime
View raw message