jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1205907 - /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java
Date Thu, 24 Nov 2011 16:19:00 GMT
Author: mduerig
Date: Thu Nov 24 16:18:59 2011
New Revision: 1205907

URL: http://svn.apache.org/viewvc?rev=1205907&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP)
add test case for pathological move conflict

Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java?rev=1205907&r1=1205906&r2=1205907&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java
Thu Nov 24 16:18:59 2011
@@ -175,6 +175,27 @@ public class MicrokernelTest {
     @Test
     @Ignore
     // todo fix microkernel
+    public void conflictingMove() {
+        MicroKernel mk = getMicroKernel();
+        String head = mk.getHeadRevision();
+
+        head = mk.commit("/", "+\"a\" : {} \r+\"b\" : {}\n", head, "");
+
+        String r1 = mk.commit("/", ">\"a\" : \"b/a\"", head, "");
+        assertFalse(mk.nodeExists("/a", r1));
+        assertTrue(mk.nodeExists("/b", r1));
+        assertTrue(mk.nodeExists("/b/a", r1));
+
+        String r2 = mk.commit("/", ">\"b\" : \"a/b\"", head, "");
+        // todo not really sure what the result should be. Currently this throws a NPE...
+//        assertFalse(mk.nodeExists("/b", r2));
+//        assertTrue(mk.nodeExists("/a", r2));
+//        assertTrue(mk.nodeExists("/a/b", r2));
+    }
+
+    @Test
+    @Ignore
+    // todo fix microkernel
     public void reorderNode() {
         MicroKernel mk = getMicroKernel();
         String head = mk.getHeadRevision();



Mime
View raw message