aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/metadata
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2019-08-16 22:36:09 +0200
committerMartin Stockhammer <martin_s@apache.org>2019-08-16 22:36:09 +0200
commit118604a706f1fd66bcda450c1ac8370eff60e4cf (patch)
treeb181604dbf884a82697e987500ceb2ed81e24f28 /archiva-modules/metadata
parente4f38c2fbe1f6ce82da98ca9d67d6cc41757f833 (diff)
downloadarchiva-118604a706f1fd66bcda450c1ac8370eff60e4cf.tar.gz
archiva-118604a706f1fd66bcda450c1ac8370eff60e4cf.zip
Fixing unit tests
Diffstat (limited to 'archiva-modules/metadata')
-rw-r--r--archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java4
-rw-r--r--archiva-modules/metadata/metadata-statistics-api/src/main/java/org/apache/archiva/metadata/repository/stats/model/RepositoryStatisticsManager.java11
2 files changed, 7 insertions, 8 deletions
diff --git a/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java b/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java
index 2d7587902..a5574d635 100644
--- a/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java
+++ b/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java
@@ -494,8 +494,8 @@ public abstract class AbstractMetadataRepositoryTest
assertNull( metadata1.getScm( ) );
assertNull( metadata1.getIssueManagement( ) );
assertNull( metadata1.getOrganization( ) );
- assertEquals( "", metadata1.getDescription( ) );
- assertEquals( "", metadata1.getName( ) );
+ assertTrue( metadata1.getDescription( )==null || "".equals(metadata1.getDescription()) );
+ assertTrue( metadata1.getName( )==null || "".equals(metadata1.getName()) );
assertEquals( TEST_PROJECT_VERSION, metadata1.getId( ) );
assertEquals( TEST_PROJECT_VERSION, metadata1.getVersion( ) );
assertTrue( metadata1.getMailingLists( ).isEmpty( ) );
diff --git a/archiva-modules/metadata/metadata-statistics-api/src/main/java/org/apache/archiva/metadata/repository/stats/model/RepositoryStatisticsManager.java b/archiva-modules/metadata/metadata-statistics-api/src/main/java/org/apache/archiva/metadata/repository/stats/model/RepositoryStatisticsManager.java
index f47e8cc16..4f149ab7c 100644
--- a/archiva-modules/metadata/metadata-statistics-api/src/main/java/org/apache/archiva/metadata/repository/stats/model/RepositoryStatisticsManager.java
+++ b/archiva-modules/metadata/metadata-statistics-api/src/main/java/org/apache/archiva/metadata/repository/stats/model/RepositoryStatisticsManager.java
@@ -19,7 +19,6 @@ package org.apache.archiva.metadata.repository.stats.model;
* under the License.
*/
-import org.apache.archiva.metadata.repository.MetadataRepository;
import org.apache.archiva.metadata.repository.MetadataRepositoryException;
import java.util.Date;
@@ -33,20 +32,20 @@ import java.util.List;
*/
public interface RepositoryStatisticsManager
{
- RepositoryStatistics getLastStatistics( MetadataRepository metadataRepository, String repositoryId )
+ RepositoryStatistics getLastStatistics( String repositoryId )
throws MetadataRepositoryException;
- boolean hasStatistics( MetadataRepository metadataRepository, String repositoryId )
+ boolean hasStatistics( String repositoryId )
throws MetadataRepositoryException;
- void addStatisticsAfterScan( MetadataRepository metadataRepository, String repositoryId, Date startTime,
+ void addStatisticsAfterScan( String repositoryId, Date startTime,
Date endTime, long totalFiles, long newFiles )
throws MetadataRepositoryException;
- void deleteStatistics( MetadataRepository metadataRepository, String repositoryId )
+ void deleteStatistics( String repositoryId )
throws MetadataRepositoryException;
- List<RepositoryStatistics> getStatisticsInRange( MetadataRepository metadataRepository, String repositoryId,
+ List<RepositoryStatistics> getStatisticsInRange( String repositoryId,
Date startTime, Date endTime )
throws MetadataRepositoryException;
}