jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1213752 - /jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/MultiMkTestBase.java
Date Tue, 13 Dec 2011 15:56:24 GMT
Author: thomasm
Date: Tue Dec 13 15:56:23 2011
New Revision: 1213752

URL: http://svn.apache.org/viewvc?rev=1213752&view=rev
Log:
Delete the directory "target/temp" before running a test.

Modified:
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/MultiMkTestBase.java

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=1213752&r1=1213751&r2=1213752&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 Dec 13 15:56:23 2011
@@ -22,6 +22,7 @@ import java.util.Collection;
 import java.util.List;
 
 import org.apache.jackrabbit.mk.api.MicroKernel;
+import org.apache.jackrabbit.mk.fs.FileUtils;
 import org.apache.jackrabbit.mk.json.JsopBuilder;
 import org.apache.jackrabbit.mk.json.JsopReader;
 import org.apache.jackrabbit.mk.json.JsopTokenizer;
@@ -55,11 +56,16 @@ public class MultiMkTestBase {
 
     @Before
     public void setUp() throws Exception {
+        FileUtils.deleteRecursive("target/temp", false);
         mk = MicroKernelFactory.getInstance(url);
         cleanRepository(mk);
 
         String root = mk.getNodes("/", mk.getHeadRevision());
-        if (!root.equals("{\":childNodeCount\":0}")) {
+        NodeImpl rootNode = NodeImpl.parse(root);
+        if (rootNode.getPropertyCount() > 0) {
+            System.out.println("Last mk not disposed: " + root);
+        }
+        if (rootNode.getChildNodeNames(Integer.MAX_VALUE).hasNext()) {
             System.out.println("Last mk not disposed: " + root);
         }
         if (PROFILE) {
@@ -109,6 +115,8 @@ public class MultiMkTestBase {
                 } else {
                     if (!key.equals(":childNodeCount")) {
                         properties.add(key);
+                    } else if (!key.equals(":hash")) {
+                        properties.add(key);
                     }
                     t.readRawValue();
                 }



Mime
View raw message