jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1512299 - /jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/RootTest.java
Date Fri, 09 Aug 2013 13:41:08 GMT
Author: mduerig
Date: Fri Aug  9 13:41:08 2013
New Revision: 1512299

URL: http://svn.apache.org/r1512299
Log:
OAK-947: New node becomes existing after Session.refresh(true)
@Ignored test case on Tree level

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

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/RootTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/RootTest.java?rev=1512299&r1=1512298&r2=1512299&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/RootTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/RootTest.java
Fri Aug  9 13:41:08 2013
@@ -18,6 +18,7 @@
  */
 package org.apache.jackrabbit.oak.core;
 
+import static org.apache.jackrabbit.oak.api.Tree.Status.NEW;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
@@ -36,6 +37,7 @@ import org.apache.jackrabbit.oak.api.Tre
 import org.apache.jackrabbit.oak.api.Type;
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 
 public class RootTest extends OakBaseTest {
@@ -314,6 +316,26 @@ public class RootTest extends OakBaseTes
     }
 
     @Test
+    @Ignore("OAK-947")  // FIXME OAK-947
+    public void rebasePreservesStatus() throws CommitFailedException {
+        Root root1 = session.getLatestRoot();
+        Root root2 = session.getLatestRoot();
+
+        Tree x = root1.getTree("/x");
+        Tree added = x.addChild("added");
+        assertEquals(NEW, added.getStatus());
+
+        root2.getTree("/x").addChild("bar");
+        root2.commit();
+
+        root1.rebase();
+
+        assertTrue(x.hasChild("added"));
+        assertEquals(NEW, x.getChild("added").getStatus());
+        assertTrue(x.hasChild("bar"));
+    }
+
+    @Test
     public void rebaseWithAddNode() throws CommitFailedException {
         Root root1 = session.getLatestRoot();
         Root root2 = session.getLatestRoot();



Mime
View raw message