jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1515330 - in /jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak: core/RootTest.java kernel/NodeStoreTest.java
Date Mon, 19 Aug 2013 09:38:33 GMT
Author: mduerig
Date: Mon Aug 19 09:38:33 2013
New Revision: 1515330

URL: http://svn.apache.org/r1515330
Log:
OAK-963: Clarify NodeStoreBranch.move() contract for move to self
Test case

Modified:
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/RootTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/kernel/NodeStoreTest.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=1515330&r1=1515329&r2=1515330&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
Mon Aug 19 09:38:33 2013
@@ -175,10 +175,11 @@ public class RootTest extends OakBaseTes
         assertEquals("/moved/new", n.getPath());
     }
 
-    // FIXME fails on SegmentMK
     @Test
     public void moveToSelf() throws CommitFailedException {
+        // FIXME fails on SegmentMK. See OAK-963
         assumeTrue(fixture != NodeStoreFixture.SEGMENT_MK);
+
         Root root = session.getLatestRoot();
         root.getTree("/").addChild("s");
         root.commit();

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/kernel/NodeStoreTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/kernel/NodeStoreTest.java?rev=1515330&r1=1515329&r2=1515330&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/kernel/NodeStoreTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/kernel/NodeStoreTest.java
Mon Aug 19 09:38:33 2013
@@ -23,6 +23,7 @@ import static org.apache.jackrabbit.oak.
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
+import static org.junit.Assume.assumeTrue;
 import static org.junit.runners.Parameterized.Parameters;
 
 import java.util.ArrayList;
@@ -44,7 +45,6 @@ import org.apache.jackrabbit.oak.spi.sta
 import org.apache.jackrabbit.oak.spi.state.NodeStore;
 import org.apache.jackrabbit.oak.spi.state.NodeStoreBranch;
 import org.junit.After;
-import org.junit.Assume;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -157,7 +157,7 @@ public class NodeStoreTest {
     @Test
     public void afterCommitHook() throws CommitFailedException {
         // this test only works with a KernelNodeStore
-        Assume.assumeTrue(store instanceof KernelNodeStore);
+        assumeTrue(store instanceof KernelNodeStore);
         final NodeState[] states = new NodeState[2]; // { before, after }
         ((KernelNodeStore) store).setObserver(new Observer() {
             @Override
@@ -322,6 +322,15 @@ public class NodeStoreTest {
     }
 
     @Test
+    public void moveToSelf() throws CommitFailedException {
+        // FIXME fails on SegmentMK. See OAK-963
+        assumeTrue(fixture != NodeStoreFixture.SEGMENT_MK);
+
+        NodeStoreBranch branch = store.branch();
+        assertFalse(branch.move("/x", "/x"));
+    }
+
+    @Test
     public void compareAgainstBaseState0() throws CommitFailedException {
         compareAgainstBaseState(0);
     }



Mime
View raw message