jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r429266 - /jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/AbstractJCRTest.java
Date Mon, 07 Aug 2006 07:47:18 GMT
Author: mreutegg
Date: Mon Aug  7 00:47:17 2006
New Revision: 429266

URL: http://svn.apache.org/viewvc?rev=429266&view=rev
Log:
JCR-505: TCK: AbstractJCRTest fails if setUp/tearDown cannot remove children of test node

Modified:
    jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/AbstractJCRTest.java

Modified: jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/AbstractJCRTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/AbstractJCRTest.java?rev=429266&r1=429265&r2=429266&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/AbstractJCRTest.java
(original)
+++ jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/AbstractJCRTest.java
Mon Aug  7 00:47:17 2006
@@ -27,6 +27,7 @@
 import javax.jcr.NamespaceException;
 import javax.jcr.RangeIterator;
 import javax.jcr.nodetype.NodeDefinition;
+import javax.jcr.nodetype.ConstraintViolationException;
 import java.util.StringTokenizer;
 import java.util.Random;
 import java.util.List;
@@ -531,7 +532,12 @@
                 Node child = children.nextNode();
                 NodeDefinition nodeDef = child.getDefinition();
                 if (!nodeDef.isMandatory() && !nodeDef.isProtected()) {
-                    child.remove();
+                    // try to remove child
+                    try {
+                        child.remove();
+                    } catch (ConstraintViolationException e) {
+                        log.println("unable to remove node: " + child.getPath());
+                    }
                 }
             }
         } else {



Mime
View raw message