jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1138396 - /jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java
Date Wed, 22 Jun 2011 10:49:54 GMT
Author: mduerig
Date: Wed Jun 22 10:49:54 2011
New Revision: 1138396

URL: http://svn.apache.org/viewvc?rev=1138396&view=rev
Log:
spi2microkernel prototype (WIP)
test

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

Modified: jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java?rev=1138396&r1=1138395&r2=1138396&view=diff
==============================================================================
--- jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java
(original)
+++ jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java
Wed Jun 22 10:49:54 2011
@@ -21,6 +21,7 @@ package org.apache.jackrabbit.spi2microk
 
 import org.apache.jackrabbit.mk.MicroKernelFactory;
 import org.apache.jackrabbit.mk.api.MicroKernel;
+import org.apache.jackrabbit.mk.json.JsopTokenizer;
 import org.json.simple.JSONArray;
 import org.json.simple.JSONObject;
 import org.json.simple.parser.JSONParser;
@@ -204,7 +205,7 @@ public class MicrokernelTest {
 
     @Ignore // fixme fix NPE in microkernel
     @Test
-    public void journal() {
+    public void journalNPE() {
         MicroKernel mk = getMicroKernel();
         String init = mk.getHeadRevision();
 
@@ -219,6 +220,26 @@ public class MicrokernelTest {
         mk.getJournal(init, head); 
     }
 
+    @Ignore // fixme fix IAE in microkernel
+    @Test
+    public void journalAddNode() {
+        MicroKernel mk = getMicroKernel();
+        String init = mk.getHeadRevision();
+
+        String head = mk.commit("/",
+                "+\"{}node\" : {}",
+                init);
+
+        String journal = mk.getJournal(head, head);
+        System.out.println(journal);
+
+        JsopTokenizer tokenizer = new JsopTokenizer(journal);
+        while (tokenizer.read() != JsopTokenizer.END) {
+            System.out.println(tokenizer.readString());
+        }
+    }
+
+
     //------------------------------------------< private >---
 
     private MicroKernel getMicroKernel() {



Mime
View raw message