import org.apache.archiva.admin.model.beans.ManagedRepository;
import org.apache.archiva.common.utils.FileUtil;
+import org.apache.archiva.redback.rest.services.AbstractRestServicesTest;
import org.apache.archiva.rest.api.services.ArchivaAdministrationService;
import org.apache.archiva.rest.api.services.BrowseService;
import org.apache.archiva.rest.api.services.CommonServices;
import org.apache.cxf.jaxrs.client.JAXRSClientFactory;
import org.apache.cxf.jaxrs.client.WebClient;
import org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider;
-import org.apache.archiva.redback.rest.services.AbstractRestServicesTest;
import org.junit.Before;
import javax.ws.rs.core.MediaType;
if ( getManagedRepositoriesService( authorizationHeader ).getManagedRepository( TARGET_REPO_ID ) != null )
{
- getManagedRepositoriesService( authorizationHeader ).deleteManagedRepository( TARGET_REPO_ID, true );
- assertNull( getManagedRepositoriesService( authorizationHeader ).getManagedRepository( TARGET_REPO_ID ) );
+ try
+ {
+ getManagedRepositoriesService( authorizationHeader ).deleteManagedRepository( TARGET_REPO_ID, true );
+ assertNull(
+ getManagedRepositoriesService( authorizationHeader ).getManagedRepository( TARGET_REPO_ID ) );
+ }
+ catch ( Exception e )
+ {
+ log.warn( "skip issue while cleaning test repository: this can cause test failure", e );
+ }
}
if ( getManagedRepositoriesService( authorizationHeader ).getManagedRepository( SOURCE_REPO_ID ) != null )
{
- getManagedRepositoriesService( authorizationHeader ).deleteManagedRepository( SOURCE_REPO_ID, true );
- assertNull( getManagedRepositoriesService( authorizationHeader ).getManagedRepository( SOURCE_REPO_ID ) );
+ try
+ {
+ getManagedRepositoriesService( authorizationHeader ).deleteManagedRepository( SOURCE_REPO_ID, true );
+ assertNull(
+ getManagedRepositoriesService( authorizationHeader ).getManagedRepository( SOURCE_REPO_ID ) );
+ }
+ catch ( Exception e )
+ {
+ log.warn( "skip issue while cleaning test repository: this can cause test failure", e );
+ }
}
}
repositoriesService.deleteArtifact( artifact );
-
artifacts =
browseService.getArtifactDownloadInfos( "org.apache.archiva.redback.components", "spring-quartz",
"2.0-SNAPSHOT", SNAPSHOT_REPO_ID );
getManagedRepositoriesService( authorizationHeader ).deleteManagedRepository( SNAPSHOT_REPO_ID, true );
assertNull( getManagedRepositoriesService( authorizationHeader ).getManagedRepository( SNAPSHOT_REPO_ID ) );
}
- ManagedRepository managedRepository =
- getTestManagedRepository( SNAPSHOT_REPO_ID, "repo-with-snapshots" );
+ ManagedRepository managedRepository = getTestManagedRepository( SNAPSHOT_REPO_ID, "repo-with-snapshots" );
/*managedRepository.setId( SNAPSHOT_REPO_ID );
managedRepository.setLocation( );
managedRepository.setCronExpression( "* * * * * ?" );*/
if ( getManagedRepositoriesService( authorizationHeader ).getManagedRepository( SNAPSHOT_REPO_ID ) != null )
{
- getManagedRepositoriesService( authorizationHeader ).deleteManagedRepository( SNAPSHOT_REPO_ID, true );
- assertNull( getManagedRepositoriesService( authorizationHeader ).getManagedRepository( SNAPSHOT_REPO_ID ) );
+ try
+ {
+ getManagedRepositoriesService( authorizationHeader ).deleteManagedRepository( SNAPSHOT_REPO_ID, true );
+ assertNull(
+ getManagedRepositoriesService( authorizationHeader ).getManagedRepository( SNAPSHOT_REPO_ID ) );
+ }
+ catch ( Exception e )
+ {
+ log.warn( "skip issue while cleaning test repository: this can cause test failure", e );
+ }
}
}