From 633f2cbfa15f2402f9216e7ab6e19fa884ec1da0 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Sun, 17 Feb 2013 20:19:21 +0000 Subject: [PATCH] more logs to try understand why intermintent failure on jenkins git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1447068 13f79535-47bb-0310-9956-ffa450edef68 --- .../services/AbstractArchivaRestTest.java | 2 ++ .../rest/services/BrowseServiceTest.java | 33 ++++++++++++------- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/AbstractArchivaRestTest.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/AbstractArchivaRestTest.java index 13d5cfb9a..1fb4fbd5a 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/AbstractArchivaRestTest.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/AbstractArchivaRestTest.java @@ -445,6 +445,8 @@ public abstract class AbstractArchivaRestTest managedRepository.setStageRepoNeeded( stageNeeded ); managedRepository.setSnapshots( true ); + //managedRepository.setScanned( scanned ); + ManagedRepositoriesService service = getManagedRepositoriesService( authorizationHeader ); service.addManagedRepository( managedRepository ); diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/BrowseServiceTest.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/BrowseServiceTest.java index b565539d3..147d5c56e 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/BrowseServiceTest.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/BrowseServiceTest.java @@ -336,23 +336,32 @@ public class BrowseServiceTest public void getArtifactDownloadInfos() throws Exception { - String testRepoId = "test-repo"; - // force guest user creation if not exists - if ( getUserService( authorizationHeader ).getGuestUser() == null ) + try { - assertNotNull( getUserService( authorizationHeader ).createGuestUser() ); - } + String testRepoId = "test-repo"; + // force guest user creation if not exists + if ( getUserService( authorizationHeader ).getGuestUser() == null ) + { + assertNotNull( getUserService( authorizationHeader ).createGuestUser() ); + } - createAndIndexRepo( testRepoId, new File( getBasedir(), "src/test/repo-with-osgi" ).getAbsolutePath(), false ); + createAndIndexRepo( testRepoId, new File( getBasedir(), "src/test/repo-with-osgi" ).getAbsolutePath(), + false ); - BrowseService browseService = getBrowseService( authorizationHeader, true ); + BrowseService browseService = getBrowseService( authorizationHeader, true ); - List artifactDownloadInfos = - browseService.getArtifactDownloadInfos( "commons-logging", "commons-logging", "1.1", testRepoId ); + List artifactDownloadInfos = + browseService.getArtifactDownloadInfos( "commons-logging", "commons-logging", "1.1", testRepoId ); - log.info( "artifactDownloadInfos {}", artifactDownloadInfos ); - assertThat( artifactDownloadInfos ).isNotNull().isNotEmpty().hasSize( 3 ); - deleteTestRepo( testRepoId ); + log.info( "artifactDownloadInfos {}", artifactDownloadInfos ); + assertThat( artifactDownloadInfos ).isNotNull().isNotEmpty().hasSize( 3 ); + deleteTestRepo( testRepoId ); + } + catch ( Exception e ) + { + log.error( e.getMessage(), e ); + throw e; + } } -- 2.39.5