jackrabbit-oak-commits mailing list archives

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

URL: http://svn.apache.org/r1445638
Log:
OAK-621: Moving tree instance with status NEW changes its status to EXISTING instead of DISCONNECTED
 Test case for the related issue when removing nodes

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

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/TreeImplTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/TreeImplTest.java?rev=1445638&r1=1445637&r2=1445638&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/TreeImplTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/TreeImplTest.java
Wed Feb 13 14:50:00 2013
@@ -182,6 +182,19 @@ public class TreeImplTest {
     }
 
     @Test
+    public void removeNew() throws CommitFailedException {
+        Tree tree = root.getTree("/");
+
+        Tree t = tree.addChild("new");
+        assertEquals(Status.NEW, t.getStatus());
+
+        t.remove();
+        assertEquals(Status.DISCONNECTED, t.getStatus());
+
+        assertNull(tree.getChild("new"));
+    }
+
+    @Test
     public void setProperty() throws CommitFailedException {
         Tree tree = root.getTree("/");
 



Mime
View raw message