summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-repository-scanner
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2014-04-22 23:02:35 +1000
committerOlivier Lamy <olamy@apache.org>2014-04-22 23:02:35 +1000
commit79cf366b8340bd99525403d8642146a4c98caf89 (patch)
treeb4b07b63b9cd3c00a2cd0fbaaa6ff4eb0cbdd0ca /archiva-modules/archiva-base/archiva-repository-scanner
parent6611fc497b8122c26418a26a6f2fc46e8e7b4af5 (diff)
downloadarchiva-79cf366b8340bd99525403d8642146a4c98caf89.tar.gz
archiva-79cf366b8340bd99525403d8642146a4c98caf89.zip
more details
Diffstat (limited to 'archiva-modules/archiva-base/archiva-repository-scanner')
-rw-r--r--archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/InvalidScanConsumer.java9
-rw-r--r--archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/RepositoryScannerTest.java2
2 files changed, 10 insertions, 1 deletions
diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/InvalidScanConsumer.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/InvalidScanConsumer.java
index a253179f7..6632c0ff6 100644
--- a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/InvalidScanConsumer.java
+++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/InvalidScanConsumer.java
@@ -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;
+ }
}
diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/RepositoryScannerTest.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/RepositoryScannerTest.java
index dc40787fc..721d97c6b 100644
--- a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/RepositoryScannerTest.java
+++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/RepositoryScannerTest.java
@@ -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