jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1241425 - in /jackrabbit/sandbox/microkernel/src: main/java/org/apache/jackrabbit/mk/ main/java/org/apache/jackrabbit/mk/mem/ test/java/org/apache/jackrabbit/mk/ test/java/org/apache/jackrabbit/mk/api/ test/java/org/apache/jackrabbit/mk/ha...
Date Tue, 07 Feb 2012 11:12:17 GMT
Author: thomasm
Date: Tue Feb  7 11:12:16 2012
New Revision: 1241425

URL: http://svn.apache.org/viewvc?rev=1241425&view=rev
Log:
Bugfixes, change URL

Modified:
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/Constants.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/MicroKernelFactory.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/MemoryKernelImpl.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeImpl.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeList.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListSmall.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListTrie.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/ConcurrentWriteTest.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/ConflictingMoveTest.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/HelloWorld.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/MoveNodeTest.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/MultiMkTestBase.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/api/MicroKernelTest.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/hash/HashTest.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/DescendantCountTest.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/LargeNodeTest.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/wrapper/IndexWrapperTest.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/wrapper/SecurityWrapperTest.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/wrapper/VirtualRepositoryWrapperTest.java

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/Constants.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/Constants.java?rev=1241425&r1=1241424&r2=1241425&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/Constants.java (original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/Constants.java Tue
Feb  7 11:12:16 2012
@@ -30,8 +30,6 @@ public class Constants {
 
     public static final String FULL_VERSION = VERSION_MAJOR + "." + VERSION_MINOR + "." +
BUILD;
 
-    public static final String DEFAULT_URL = "mem:";
-
     public static final int MAX_STORE_RETRY = 3;
 
     public static final int MAX_CHILD_COUNT = 200;

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/MicroKernelFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/MicroKernelFactory.java?rev=1241425&r1=1241424&r2=1241425&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/MicroKernelFactory.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/MicroKernelFactory.java
Tue Feb  7 11:12:16 2012
@@ -36,10 +36,11 @@ public class MicroKernelFactory {
     /**
      * Get an instance. Supported URLs:
      * <ul>
-     * <li>mem: (in-memory implementation)</li>
      * <li>fs:target/mk-test (using the directory ./target/mk-test)</li>
      * <li>fs:target/mk-test;clean (same, but delete the old repository first)</li>
      * <li>fs:{homeDir} (use the system property homeDir or '.' if not set)</li>
+     * <li>simple: (in-memory implementation)</li>
+     * <li>simple:fs:target/temp (using the directory ./target/temp)</li>
      * </ul>
      *
      * @param url the repository URL
@@ -48,6 +49,8 @@ public class MicroKernelFactory {
     public static MicroKernel getInstance(String url) {
         if (url.startsWith("mem:")) {
             return MemoryKernelImpl.get(url);
+        } else if (url.startsWith("simple:")) {
+                return MemoryKernelImpl.get(url);
         } else if (url.startsWith("log:")) {
             return LogWrapper.get(url);
         } else if (url.startsWith("sec:")) {

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/MemoryKernelImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/MemoryKernelImpl.java?rev=1241425&r1=1241424&r2=1241425&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/MemoryKernelImpl.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/MemoryKernelImpl.java
Tue Feb  7 11:12:16 2012
@@ -58,8 +58,7 @@ Node structure:
 */
 
 /**
- * An in-memory implementation.
- * Useful for testing.
+ * A simple MicroKernel implementation.
  */
 public class MemoryKernelImpl extends WrapperBase implements MicroKernel {
 
@@ -147,7 +146,12 @@ public class MemoryKernelImpl extends Wr
                 throw ExceptionFactory.convert(e);
             }
         }
-        String name = url.substring("mem:".length());
+        String name;
+        if (url.startsWith("simple:")) {
+            name = url.substring("simple:".length());
+        } else {
+            name = url.substring("mem:".length());
+        }
         if (clean) {
             INSTANCES.remove(name);
         }
@@ -535,7 +539,8 @@ public class MemoryKernelImpl extends Wr
         if (rev == null) {
             throw ExceptionFactory.get("Revision not found: " + revisionId);
         }
-        return rev.getNode("data");
+        rev = rev.getNode("data");
+        return rev;
     }
 
     private NodeImpl getRevisionIfExists(String revisionId) {

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeImpl.java?rev=1241425&r1=1241424&r2=1241425&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeImpl.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeImpl.java
Tue Feb  7 11:12:16 2012
@@ -174,10 +174,6 @@ public class NodeImpl implements Cache.V
         return childNodes.get(name).getNode(map);
     }
 
-    private void addNode(String name, NodeImpl node) {
-        childNodes.add(name, map.addNode(node));
-    }
-
     public NodeImpl cloneAndAddChildNode(String path, boolean before, String position, NodeImpl
newNode, long revId) {
         int index = PathUtils.getNextSlash(path, 0);
         if (index < 0) {
@@ -196,9 +192,7 @@ public class NodeImpl implements Cache.V
         long diffDescendant = -n.descendantCount;
         long diffInline = -n.descendantInlineCount;
         NodeImpl n2 = n.cloneAndAddChildNode(path.substring(index + 1), before, position,
newNode, revId);
-        NodeImpl clone = createClone(revId);
-        clone.childNodes.remove(child);
-        clone.addNode(child, n2);
+        NodeImpl clone = setChild(child, n2, revId);
         diffDescendant += n2.descendantCount;
         diffInline += n2.descendantInlineCount;
         clone.descendantCount += diffDescendant;
@@ -221,9 +215,7 @@ public class NodeImpl implements Cache.V
         long diffDescendant = -n.descendantCount;
         long diffInline = -n.descendantInlineCount;
         NodeImpl n2 = n.cloneAndRemoveChildNode(path.substring(index + 1), revId);
-        NodeImpl clone = createClone(revId);
-        clone.childNodes.remove(child);
-        clone.addNode(child, n2);
+        NodeImpl clone = setChild(child, n2, revId);
         diffDescendant += n2.descendantCount;
         diffInline += n2.descendantInlineCount;
         clone.descendantCount += diffDescendant;
@@ -244,9 +236,7 @@ public class NodeImpl implements Cache.V
             throw ExceptionFactory.get("Node not found: " + path);
         }
         NodeImpl n2 = n.cloneAndSetProperty(path.substring(index + 1), value, revId);
-        NodeImpl c = createClone(revId);
-        c.childNodes.remove(child);
-        c.addNode(child, n2);
+        NodeImpl c = setChild(child, n2, revId);
         return c;
     }
 
@@ -346,7 +336,7 @@ public class NodeImpl implements Cache.V
         if (Constants.NODE_NAME_AS_PROPERTY) {
             node.setProperty(NAME, JsopBuilder.encode(name));
         }
-        addNode(name, node);
+        childNodes.add(name, map.addNode(node));
         descendantCount += node.descendantCount + 1;
         if (node.getId().isInline()) {
             descendantInlineCount += node.descendantInlineCount + 1;
@@ -396,7 +386,7 @@ public class NodeImpl implements Cache.V
         }
     }
 
-    void setProperty(String name, String value) {
+    public void setProperty(String name, String value) {
         propertyValuePairs = updatePair(propertyValuePairs, name, value);
     }
 
@@ -664,15 +654,17 @@ public class NodeImpl implements Cache.V
     }
 
     public NodeImpl setChild(String name, NodeImpl child, long revId) {
-        NodeImpl result = this;
-        if (exists(name)) {
-            NodeImpl n = getChildNode(name);
-            if (n == child) {
-                return result;
-            }
-            result = cloneAndRemoveChildNode(name, revId);
+        NodeImpl result = createClone(revId);
+        NodeId id = map.addNode(child);
+        if (childNodes == null) {
+            result.childNodes = new NodeListSmall();
+            result.childNodes.add(name, id);
+        } else if (childNodes.containsKey(name)) {
+            result.childNodes.replace(name, id);
+        } else {
+            result.childNodes.add(name, id);
         }
-        return result.cloneAndAddChildNode(name, false, null, child, revId);
+        return result;
     }
 
     void visit(ChildVisitor v) {

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeList.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeList.java?rev=1241425&r1=1241424&r2=1241425&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeList.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeList.java
Tue Feb  7 11:12:16 2012
@@ -59,6 +59,14 @@ interface NodeList {
     void add(String name, NodeId x);
 
     /**
+     * Replace an existing child node (keep the position).
+     *
+     * @param name the node name
+     * @param x the node id
+     */
+    void replace(String name, NodeId x);
+
+    /**
      * Get the child node name at this position. If the index is larger than the
      * number of child nodes, then null is returned.
      *

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListSmall.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListSmall.java?rev=1241425&r1=1241424&r2=1241425&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListSmall.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListSmall.java
Tue Feb  7 11:12:16 2012
@@ -123,6 +123,14 @@ public class NodeListSmall implements No
         size++;
     }
 
+    public void replace(String name, NodeId x) {
+        int index = find(name);
+        if (index < 0) {
+            throw ExceptionFactory.get("Node not found: " + name);
+        }
+        children = ArrayUtils.arrayReplace(children, sort[index], x);
+    }
+
     public String getName(long pos) {
         return pos >= names.length ? null : names[(int) pos];
     }

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListTrie.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListTrie.java?rev=1241425&r1=1241424&r2=1241425&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListTrie.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListTrie.java
Tue Feb  7 11:12:16 2012
@@ -223,6 +223,17 @@ public class NodeListTrie implements Nod
         size++;
     }
 
+    public void replace(String name, NodeId x) {
+        int index = getChildIndex(name);
+        if (index < 0) {
+            throw ExceptionFactory.get("Node not found: " + name);
+        } else {
+            Child c = children.get(index);
+            NodeList list = getList(c, true);
+            list.replace(name, x);
+        }
+    }
+
     public NodeId remove(String name) {
         int index = getChildIndex(name);
         if (index < 0) {

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/ConcurrentWriteTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/ConcurrentWriteTest.java?rev=1241425&r1=1241424&r2=1241425&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/ConcurrentWriteTest.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/ConcurrentWriteTest.java
Tue Feb  7 11:12:16 2012
@@ -26,8 +26,8 @@ public class ConcurrentWriteTest extends
 
     private static final String URL = "fs:{homeDir}/target;clean";
     // private static final String URL = "fs:{homeDir}/target";
-    // private static final String URL = "mem:";
-    //private static final String URL = "mem:fs:target/temp;clean";
+    // private static final String URL = "simple:";
+    //private static final String URL = "simple:fs:target/temp;clean";
 
     private static final int NUM_THREADS = 20;
     private static final int NUM_CHILDNODES = 1000;

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/ConflictingMoveTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/ConflictingMoveTest.java?rev=1241425&r1=1241424&r2=1241425&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/ConflictingMoveTest.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/ConflictingMoveTest.java
Tue Feb  7 11:12:16 2012
@@ -95,7 +95,7 @@ public class ConflictingMoveTest extends
 
     @Test
     public void doubleDelete() {
-        if (!isMemoryKernel(mk)) {
+        if (!isSimpleKernel(mk)) {
             // TODO
             return;
         }

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/HelloWorld.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/HelloWorld.java?rev=1241425&r1=1241424&r2=1241425&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/HelloWorld.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/HelloWorld.java
Tue Feb  7 11:12:16 2012
@@ -26,8 +26,8 @@ public class HelloWorld {
 
     public static void main(String... args) throws ParseException {
         test("fs:{homeDir};clean");
-        test("mem:");
-        test("mem:fs:target/temp;clean");
+        test("simple:");
+        test("simple:fs:target/temp;clean");
     }
 
     private static void test(String url) throws ParseException {

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/MoveNodeTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/MoveNodeTest.java?rev=1241425&r1=1241424&r2=1241425&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/MoveNodeTest.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/MoveNodeTest.java
Tue Feb  7 11:12:16 2012
@@ -57,7 +57,7 @@ public class MoveNodeTest extends MultiM
 
     @Test
     public void addPropertyTwice() {
-        if (!isMemoryKernel(mk)) {
+        if (!isSimpleKernel(mk)) {
             return;
         }
 
@@ -94,7 +94,7 @@ public class MoveNodeTest extends MultiM
 
     @Test
     public void reorderBefore() {
-        if (!isMemoryKernel(mk)) {
+        if (!isSimpleKernel(mk)) {
             return;
         }
 
@@ -111,7 +111,7 @@ public class MoveNodeTest extends MultiM
 
     @Test
     public void reorderAfter() {
-        if (!isMemoryKernel(mk)) {
+        if (!isSimpleKernel(mk)) {
             return;
         }
 
@@ -133,7 +133,7 @@ public class MoveNodeTest extends MultiM
 
     @Test
     public void moveFirst() {
-        if (!isMemoryKernel(mk)) {
+        if (!isSimpleKernel(mk)) {
             return;
         }
 
@@ -152,7 +152,7 @@ public class MoveNodeTest extends MultiM
 
     @Test
     public void moveCombinedWithSet() {
-        if (!isMemoryKernel(mk)) {
+        if (!isSimpleKernel(mk)) {
             return;
         }
 
@@ -173,7 +173,7 @@ public class MoveNodeTest extends MultiM
 
     @Test
     public void moveBefore() {
-        if (!isMemoryKernel(mk)) {
+        if (!isSimpleKernel(mk)) {
             return;
         }
 
@@ -192,7 +192,7 @@ public class MoveNodeTest extends MultiM
 
     @Test
     public void moveAfter() {
-        if (!isMemoryKernel(mk)) {
+        if (!isSimpleKernel(mk)) {
             return;
         }
 
@@ -217,7 +217,7 @@ public class MoveNodeTest extends MultiM
 
     @Test
     public void moveLast() {
-        if (!isMemoryKernel(mk)) {
+        if (!isSimpleKernel(mk)) {
             return;
         }
 
@@ -241,7 +241,7 @@ public class MoveNodeTest extends MultiM
         Assert.assertEquals("{a,b,c}", getNode("/test"));
         Assert.assertEquals("{copy:{a,b,c}}", getNode("/test2"));
 
-        if (isMemoryKernel(mk)) {
+        if (isSimpleKernel(mk)) {
             assertJournal("*\"/test\":\"/test2/copy\"");
         } else {
             assertJournal("+\"/test2/copy\":{\"a\":{},\"b\":{},\"c\":{}}");

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/MultiMkTestBase.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/MultiMkTestBase.java?rev=1241425&r1=1241424&r2=1241425&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/MultiMkTestBase.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/MultiMkTestBase.java
Tue Feb  7 11:12:16 2012
@@ -48,8 +48,8 @@ public class MultiMkTestBase {
     public static Collection<Object[]> urls() {
             return Arrays.asList(new Object[][]{
                     {"fs:{homeDir}/target"},
-                    {"mem:"},
-                    {"mem:fs:target/temp"},
+                    {"simple:"},
+                    {"simple:fs:target/temp"},
                     {"http-bridge:fs:{homeDir}/target"}
                     });
     }
@@ -85,10 +85,13 @@ public class MultiMkTestBase {
     }
 
     protected void reconnect() {
-        if (!url.equals("mem:")) {
+        if (mk != null) {
+            if (url.equals("simple:")) {
+                return;
+            }
             mk.dispose();
-            mk = MicroKernelFactory.getInstance(url);
         }
+        mk = MicroKernelFactory.getInstance(url);
     }
 
     /**
@@ -96,7 +99,7 @@ public class MultiMkTestBase {
      *
      * @return true if it is
      */
-    public static boolean isMemoryKernel(MicroKernel mk) {
+    public static boolean isSimpleKernel(MicroKernel mk) {
         return mk.nodeExists("/:info", mk.getHeadRevision());
     }
 

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/api/MicroKernelTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/api/MicroKernelTest.java?rev=1241425&r1=1241424&r2=1241425&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/api/MicroKernelTest.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/api/MicroKernelTest.java
Tue Feb  7 11:12:16 2012
@@ -149,10 +149,6 @@ public class MicroKernelTest extends Mul
 
     @Test
     public void addItemsIncrementally() {
-        if (url.startsWith("mem:")) {
-            // todo MemoryKernelImpl fails, investigate & fix test/impl
-            return;
-        }
         String head = mk.getHeadRevision();
 
         String node = "n_" + System.currentTimeMillis();
@@ -251,7 +247,7 @@ public class MicroKernelTest extends Mul
 
     @Test
     public void reorderNode() {
-        if (!url.startsWith("mem:")) {
+        if (!isSimpleKernel(mk)) {
             // todo provide node reorder-support (MicroKernelImpl)
             return;
         }

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/hash/HashTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/hash/HashTest.java?rev=1241425&r1=1241424&r2=1241425&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/hash/HashTest.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/hash/HashTest.java
Tue Feb  7 11:12:16 2012
@@ -40,7 +40,7 @@ public class HashTest extends MultiMkTes
 
     @After
     public void tearDown() throws InterruptedException {
-        if (isMemoryKernel(mk)) {
+        if (isSimpleKernel(mk)) {
             head = mk.commit("/:root/head/config", "^ \"hash\": false", head, "");
             head = mk.commit("/:root/head/config", "^ \"hash\": null", head, "");
         }
@@ -50,7 +50,7 @@ public class HashTest extends MultiMkTes
     @Test
     public void getHash() {
         head = mk.getHeadRevision();
-        if (isMemoryKernel(mk)) {
+        if (isSimpleKernel(mk)) {
             head = mk.commit("/:root/head/config", "^ \"hash\": true", head, "");
         } else {
             int todo;

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/DescendantCountTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/DescendantCountTest.java?rev=1241425&r1=1241424&r2=1241425&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/DescendantCountTest.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/DescendantCountTest.java
Tue Feb  7 11:12:16 2012
@@ -38,7 +38,7 @@ public class DescendantCountTest extends
 
     @After
     public void tearDown() throws InterruptedException {
-        if (isMemoryKernel(mk)) {
+        if (isSimpleKernel(mk)) {
             mk.commit("/:root/head/config", "^ \"descendantCount\": false", mk.getHeadRevision(),
"");
             mk.commit("/:root/head/config", "^ \"descendantCount\": null", mk.getHeadRevision(),
"");
         }
@@ -47,7 +47,7 @@ public class DescendantCountTest extends
 
     @Test
     public void test() throws Exception {
-        if (!isMemoryKernel(mk)) {
+        if (!isSimpleKernel(mk)) {
             return;
         }
 

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/LargeNodeTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/LargeNodeTest.java?rev=1241425&r1=1241424&r2=1241425&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/LargeNodeTest.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/LargeNodeTest.java
Tue Feb  7 11:12:16 2012
@@ -46,7 +46,7 @@ public class LargeNodeTest extends Multi
 
     @After
     public void tearDown() throws InterruptedException {
-        if (isMemoryKernel(mk)) {
+        if (isSimpleKernel(mk)) {
             head = mk.commit("/:root/head/config", "^ \"maxMemoryChildren\": " + Integer.MAX_VALUE,
head, "");
             head = mk.commit("/:root/head/config", "^ \"maxMemoryChildren\": null", head,
"");
         }
@@ -69,7 +69,7 @@ public class LargeNodeTest extends Multi
 
     @Test
     public void largeNodeListAndGetNodes() {
-        if (!isMemoryKernel(mk)) {
+        if (!isSimpleKernel(mk)) {
             return;
         }
         int max = 90;
@@ -85,7 +85,7 @@ public class LargeNodeTest extends Multi
 
     @Test
     public void veryLargeNodeList() {
-        if (isMemoryKernel(mk)) {
+        if (isSimpleKernel(mk)) {
             int max = 2000;
             head = mk.commit("/:root/head/config", "^ \"maxMemoryChildren\":" + max, head,
"");
             Assert.assertEquals("{\"maxMemoryChildren\":"+max+",\":childNodeCount\":0}",
mk.getNodes("/:root/head/config", head));
@@ -120,7 +120,7 @@ public class LargeNodeTest extends Multi
 
     @Test
     public void largeNodeList() {
-        if (!isMemoryKernel(mk)) {
+        if (!isSimpleKernel(mk)) {
             return;
         }
 

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/wrapper/IndexWrapperTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/wrapper/IndexWrapperTest.java?rev=1241425&r1=1241424&r2=1241425&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/wrapper/IndexWrapperTest.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/wrapper/IndexWrapperTest.java
Tue Feb  7 11:12:16 2012
@@ -46,7 +46,7 @@ public class IndexWrapperTest extends Mu
 
     @Test
     public void prefix() {
-        if (!isMemoryKernel(mk)) {
+        if (!isSimpleKernel(mk)) {
             return;
         }
         head = mk.commit("/index", "+ \"prefix:x\": {}", head, "");
@@ -64,7 +64,7 @@ public class IndexWrapperTest extends Mu
 
     @Test
     public void propertyUnique() {
-        if (!isMemoryKernel(mk)) {
+        if (!isSimpleKernel(mk)) {
             return;
         }
         head = mk.commit("/index", "+ \"property:id,unique\": {}", head, "");
@@ -78,7 +78,7 @@ public class IndexWrapperTest extends Mu
 
     @Test
     public void propertyNonUnique() {
-        if (!isMemoryKernel(mk)) {
+        if (!isSimpleKernel(mk)) {
             return;
         }
         head = mk.commit("/index", "+ \"property:ref\": {}", head, "");

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/wrapper/SecurityWrapperTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/wrapper/SecurityWrapperTest.java?rev=1241425&r1=1241424&r2=1241425&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/wrapper/SecurityWrapperTest.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/wrapper/SecurityWrapperTest.java
Tue Feb  7 11:12:16 2012
@@ -49,7 +49,7 @@ public class SecurityWrapperTest extends
     @Before
     public void setUp() throws Exception {
         super.setUp();
-        if (!isMemoryKernel(mk)) {
+        if (!isSimpleKernel(mk)) {
             return;
         }
         head = mk.getHeadRevision();
@@ -87,7 +87,7 @@ public class SecurityWrapperTest extends
 
     @Test
     public void commit() {
-        if (!isMemoryKernel(mk)) {
+        if (!isSimpleKernel(mk)) {
             return;
         }
         head = mkAdmin.commit("/", "+ \"test\": { \"data\": \"Hello\" }", head, null);
@@ -102,7 +102,7 @@ public class SecurityWrapperTest extends
 
     @Test
     public void getJournal() {
-        if (!isMemoryKernel(mk)) {
+        if (!isSimpleKernel(mk)) {
             return;
         }
         String fromRevision = mkAdmin.getHeadRevision();
@@ -129,7 +129,7 @@ public class SecurityWrapperTest extends
 
     @Test
     public void getNodes() {
-        if (!isMemoryKernel(mk)) {
+        if (!isSimpleKernel(mk)) {
             return;
         }
         head = mk.getHeadRevision();

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/wrapper/VirtualRepositoryWrapperTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/wrapper/VirtualRepositoryWrapperTest.java?rev=1241425&r1=1241424&r2=1241425&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/wrapper/VirtualRepositoryWrapperTest.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/wrapper/VirtualRepositoryWrapperTest.java
Tue Feb  7 11:12:16 2012
@@ -81,7 +81,7 @@ public class VirtualRepositoryWrapperTes
 
     @Test
     public void commit() {
-        if (!isMemoryKernel(mk)) {
+        if (!isSimpleKernel(mk)) {
             return;
         }
 



Mime
View raw message