]> source.dussan.org Git - archiva.git/commitdiff
more details
authorOlivier Lamy <olamy@apache.org>
Tue, 22 Apr 2014 13:02:35 +0000 (23:02 +1000)
committerOlivier Lamy <olamy@apache.org>
Tue, 22 Apr 2014 13:02:35 +0000 (23:02 +1000)
archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/InvalidScanConsumer.java
archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/RepositoryScannerTest.java

index a253179f7605b499d4f1abe360090d2a686b9e9c..6632c0ff698c1e4e0665dc485b99ba9f2586e7ab 100644 (file)
@@ -28,6 +28,7 @@ import org.slf4j.LoggerFactory;
 import org.springframework.context.annotation.Scope;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
@@ -49,6 +50,8 @@ public class InvalidScanConsumer
     
     private int processCount = 0;
 
+    private List<String> paths = new ArrayList<>( );
+
     @Override
     public void beginScan( ManagedRepository repository, Date whenGathered )
         throws ConsumerException
@@ -92,6 +95,7 @@ public class InvalidScanConsumer
         throws ConsumerException
     {
         logger.info( "processFile: {}", path );
+        paths.add( path );
         processCount++;
     }
 
@@ -134,4 +138,9 @@ public class InvalidScanConsumer
     {
         this.id = id;
     }
+
+    public List<String> getPaths()
+    {
+        return paths;
+    }
 }
index dc40787fc07332fad4e81e5fc0c224cb222cd1b1..721d97c6b89a2170cdaaecb18d2fb399ebf7d09a 100644 (file)
@@ -253,7 +253,7 @@ public class RepositoryScannerTest
         assertNotNull( "Stats should not be null.", stats );
         assertMinimumHits( "Stats.totalFileCount", 17, stats.getTotalFileCount() );
         assertMinimumHits( "Processed Count", 17, consumer.getProcessCount() );
-        assertEquals( "Processed Count (of invalid items)", 6, badconsumer.getProcessCount() );
+        assertEquals( "Processed Count (of invalid items):" + badconsumer.getPaths(), 6, badconsumer.getProcessCount() );
     }
 
     @Test