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> repoStats = new HashMap>(); + public boolean hasStatistics( MetadataRepository metadataRepository, String repositoryId ) + throws MetadataRepositoryException + { + return !repoStats.isEmpty(); + } + public RepositoryStatistics getLastStatistics( MetadataRepository metadataRepository, String repositoryId ) { List repositoryStatisticsList = getStatsList( repositoryId );