aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-scheduler
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2012-12-19 15:21:34 +0000
committerOlivier Lamy <olamy@apache.org>2012-12-19 15:21:34 +0000
commit3c0ed32a13b73308247383ebb700bc9589b7571f (patch)
tree9a29440a142581fa491960adc42685b51cbab5bb /archiva-modules/archiva-scheduler
parente92fede1556b025a9db90d334d77481450e119bf (diff)
downloadarchiva-3c0ed32a13b73308247383ebb700bc9589b7571f.tar.gz
archiva-3c0ed32a13b73308247383ebb700bc9589b7571f.zip
fix mock RepositoryStatisticsManager compilation
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1423880 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-scheduler')
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestRepositoryStatisticsManager.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestRepositoryStatisticsManager.java b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestRepositoryStatisticsManager.java
index 950f47789..cf98060e7 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestRepositoryStatisticsManager.java
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestRepositoryStatisticsManager.java
@@ -20,6 +20,7 @@ package org.apache.archiva.scheduler.repository;
*/
import org.apache.archiva.metadata.repository.MetadataRepository;
+import org.apache.archiva.metadata.repository.MetadataRepositoryException;
import org.apache.archiva.metadata.repository.stats.RepositoryStatistics;
import org.apache.archiva.metadata.repository.stats.RepositoryStatisticsManager;
import org.springframework.stereotype.Service;
@@ -30,12 +31,18 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-@Service("repositoryStatisticsManager#test")
+@Service( "repositoryStatisticsManager#test" )
public class TestRepositoryStatisticsManager
implements RepositoryStatisticsManager
{
private Map<String, List<RepositoryStatistics>> repoStats = new HashMap<String, List<RepositoryStatistics>>();
+ public boolean hasStatistics( MetadataRepository metadataRepository, String repositoryId )
+ throws MetadataRepositoryException
+ {
+ return !repoStats.isEmpty();
+ }
+
public RepositoryStatistics getLastStatistics( MetadataRepository metadataRepository, String repositoryId )
{
List<RepositoryStatistics> repositoryStatisticsList = getStatsList( repositoryId );