Revision: 56981
Author:   uhommes
Date:     2015-12-01 12:18:44 +0100 (Tue, 01 Dec 2015)
Log Message:
-----------
REPO-1 don't fail on teardown when trying to remove nodes that were 
concurrently removed

Modified Paths:
--------------
    
hippo-cms7/repository/branches/hippo-repository-3.1.x/testutils/src/main/java/org/onehippo/repository/testutils/RepositoryTestCase.java

Modified: 
hippo-cms7/repository/branches/hippo-repository-3.1.x/testutils/src/main/java/org/onehippo/repository/testutils/RepositoryTestCase.java
===================================================================
--- 
hippo-cms7/repository/branches/hippo-repository-3.1.x/testutils/src/main/java/org/onehippo/repository/testutils/RepositoryTestCase.java
     2015-12-01 10:40:17 UTC (rev 56980)
+++ 
hippo-cms7/repository/branches/hippo-repository-3.1.x/testutils/src/main/java/org/onehippo/repository/testutils/RepositoryTestCase.java
     2015-12-01 11:18:44 UTC (rev 56981)
@@ -25,6 +25,7 @@
 import java.util.UUID;
 
 import javax.jcr.Credentials;
+import javax.jcr.ItemNotFoundException;
 import javax.jcr.Node;
 import javax.jcr.PropertyType;
 import javax.jcr.RepositoryException;
@@ -181,10 +182,13 @@
 
     protected void removeNode(final String path) throws RepositoryException {
         while (session != null && session.nodeExists(path)) {
+            try {
             session.getNode(path).remove();
             session.save();
+            } catch (ItemNotFoundException ignore) {
         }
     }
+    }
 
     protected Collection<String> getPathsToCheck() {
         return Arrays.asList(

_______________________________________________
Hippocms-svn mailing list
[email protected]
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to