]> source.dussan.org Git - archiva.git/commitdiff
more logs to try understand why intermintent failure on jenkins
authorOlivier Lamy <olamy@apache.org>
Sun, 17 Feb 2013 20:19:21 +0000 (20:19 +0000)
committerOlivier Lamy <olamy@apache.org>
Sun, 17 Feb 2013 20:19:21 +0000 (20:19 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1447068 13f79535-47bb-0310-9956-ffa450edef68

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

index 13d5cfb9a9c43c80d22204820acf4f0fbd1410ba..1fb4fbd5a120f2a164f2d1c7551d0388e7181d6d 100644 (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 );
 
index b565539d34c6265c784cea9477b4b91d6f098e27..147d5c56ec3bbdcddd8819ace394d045f62c57f0 100644 (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 );
+            createAndIndexRepo( testRepoId, new File( getBasedir(), "src/test/repo-with-osgi" ).getAbsolutePath(),
+                                false );
 
-        BrowseService browseService = getBrowseService( authorizationHeader, true );
+            BrowseService browseService = getBrowseService( authorizationHeader, true );
 
-        List<Artifact> artifactDownloadInfos =
-            browseService.getArtifactDownloadInfos( "commons-logging", "commons-logging", "1.1", testRepoId );
+            List<Artifact> 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;
+        }
     }