jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1365123 - /jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/RootImplTest.java
Date Tue, 24 Jul 2012 15:23:22 GMT
Author: mduerig
Date: Tue Jul 24 15:23:22 2012
New Revision: 1365123

URL: http://svn.apache.org/viewvc?rev=1365123&view=rev
Log:
OAK-208: RootImplFuzzIT test failures
regression test

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=1365123&r1=1365122&r2=1365123&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
Tue Jul 24 15:23:22 2012
@@ -33,6 +33,7 @@ import org.apache.jackrabbit.oak.api.Pro
 import org.apache.jackrabbit.oak.api.Tree;
 import org.apache.jackrabbit.oak.api.Tree.Status;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -241,6 +242,29 @@ public class RootImplTest extends Abstra
         assertEquals("y", x.getParent().getName());
     }
 
+    @Test @Ignore
+    /**
+     * Regression test for OAK-208
+     */
+    public void removeMoved() throws CommitFailedException {
+        RootImpl root = new RootImpl(store, null);
+        Tree r = root.getTree("");
+        r.addChild("a");
+        r.addChild("b");
+
+        root.move("a", "b/c");
+        assertFalse(r.hasChild("a"));
+        assertTrue(r.hasChild("b"));
+
+        r.getChild("b").remove();
+        assertFalse(r.hasChild("a"));
+        assertFalse(r.hasChild("b"));
+
+        root.commit(DefaultConflictHandler.OURS);
+        assertFalse(r.hasChild("a"));
+        assertFalse(r.hasChild("b"));
+    }
+
     @Test
     public void rename() throws CommitFailedException {
         RootImpl root = new RootImpl(store, null);



Mime
View raw message