jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1206008 - /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java
Date Thu, 24 Nov 2011 22:45:33 GMT
Author: mduerig
Date: Thu Nov 24 22:45:32 2011
New Revision: 1206008

URL: http://svn.apache.org/viewvc?rev=1206008&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP)
add test case for pathological add delete 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=1206008&r1=1206007&r2=1206008&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 22:45:32 2011
@@ -196,6 +196,27 @@ public class MicrokernelTest {
     @Test
     @Ignore
     // todo fix microkernel
+    public void conflictingAddDelete() {
+        MicroKernel mk = getMicroKernel();
+        String head = mk.getHeadRevision();
+
+        head = mk.commit("/", "+\"a\" : {} \r+\"b\" : {}\n", head, "");
+
+        String r1 = mk.commit("/", "-\"b\" \r +\"a/x\" : {}", head, "");
+        assertFalse(mk.nodeExists("/b", r1));
+        assertTrue(mk.nodeExists("/a", r1));
+        assertTrue(mk.nodeExists("/a/x", r1));
+
+        String r2 = mk.commit("/", "-\"a\" \r +\"b/x\" : {}", head, "");
+        // todo not really sure what the result should be. Currently this throws a NPE...
+//        assertFalse(mk.nodeExists("/a", r2));
+//        assertTrue(mk.nodeExists("/b", r2));
+//        assertTrue(mk.nodeExists("/b/x", r2));
+    }
+
+    @Test
+    @Ignore
+    // todo fix microkernel
     public void reorderNode() {
         MicroKernel mk = getMicroKernel();
         String head = mk.getHeadRevision();



Mime
View raw message