]> source.dussan.org Git - archiva.git/commitdiff
avoid jackrabbit failure on deleting a test repo
authorOlivier Lamy <olamy@apache.org>
Fri, 29 Jun 2012 13:29:57 +0000 (13:29 +0000)
committerOlivier Lamy <olamy@apache.org>
Fri, 29 Jun 2012 13:29:57 +0000 (13:29 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1355375 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RepositoriesServiceTest.java

index 96ce88b0983a095b90707a3dc3e309056edf01fb..80ecdfcd6035b82d4d865165205887dc9beae101 100644 (file)
@@ -318,8 +318,7 @@ public class RepositoriesServiceTest
         }
         finally
         {
-            getManagedRepositoriesService( authorizationHeader ).deleteManagedRepository( managedRepository.getId(),
-                                                                                          true );
+            cleanQuietlyRepo( managedRepository.getId() );
         }
     }
 
@@ -336,8 +335,19 @@ public class RepositoriesServiceTest
         }
         finally
         {
-            getManagedRepositoriesService( authorizationHeader ).deleteManagedRepository( managedRepository.getId(),
-                                                                                          true );
+            cleanQuietlyRepo( managedRepository.getId() );
+        }
+    }
+
+    protected void cleanQuietlyRepo( String id )
+    {
+        try
+        {
+            getManagedRepositoriesService( authorizationHeader ).deleteManagedRepository( id, true );
+        }
+        catch ( Exception e )
+        {
+            log.info( "ignore issue deleting test repo: {}", e.getMessage() );
         }
     }