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
This commit is contained in:
Olivier Lamy 2013-02-17 20:19:21 +00:00
parent 8405a4882f
commit 633f2cbfa1
2 changed files with 26 additions and 15 deletions

View File

@ -445,6 +445,8 @@ public abstract class AbstractArchivaRestTest
managedRepository.setStageRepoNeeded( stageNeeded );
managedRepository.setSnapshots( true );
//managedRepository.setScanned( scanned );
ManagedRepositoriesService service = getManagedRepositoriesService( authorizationHeader );
service.addManagedRepository( managedRepository );

View File

@ -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 );
BrowseService browseService = getBrowseService( authorizationHeader, true );
List<Artifact> artifactDownloadInfos =
browseService.getArtifactDownloadInfos( "commons-logging", "commons-logging", "1.1", testRepoId );
log.info( "artifactDownloadInfos {}", artifactDownloadInfos );
assertThat( artifactDownloadInfos ).isNotNull().isNotEmpty().hasSize( 3 );
deleteTestRepo( testRepoId );
}
catch ( Exception e )
{
log.error( e.getMessage(), e );
throw e;
}
createAndIndexRepo( testRepoId, new File( getBasedir(), "src/test/repo-with-osgi" ).getAbsolutePath(), false );
BrowseService browseService = getBrowseService( authorizationHeader, true );
List<Artifact> artifactDownloadInfos =
browseService.getArtifactDownloadInfos( "commons-logging", "commons-logging", "1.1", testRepoId );
log.info( "artifactDownloadInfos {}", artifactDownloadInfos );
assertThat( artifactDownloadInfos ).isNotNull().isNotEmpty().hasSize( 3 );
deleteTestRepo( testRepoId );
}