aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-scheduler
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2020-06-07 19:09:02 +0200
committerMartin Stockhammer <martin_s@apache.org>2020-06-07 19:09:02 +0200
commitaa8de8c74bf32637227d55b583e3d75979eadaff (patch)
treeb3f6494620f46ab38460afe67ceb2cb77913337f /archiva-modules/archiva-scheduler
parent91900a637600400b93e782e71994f57a86bd74a3 (diff)
downloadarchiva-aa8de8c74bf32637227d55b583e3d75979eadaff.tar.gz
archiva-aa8de8c74bf32637227d55b583e3d75979eadaff.zip
Switching to new API
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/ArchivaRepositoryScanningTaskExecutorPhase1Test.java2
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorPhase2Test.java8
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestConsumer.java9
3 files changed, 10 insertions, 9 deletions
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorPhase1Test.java b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorPhase1Test.java
index 6d6383a57..c25b33247 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorPhase1Test.java
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorPhase1Test.java
@@ -47,7 +47,7 @@ public class ArchivaRepositoryScanningTaskExecutorPhase1Test
taskExecutor.executeTask( repoTask );
- Collection<ArtifactReference> unprocessedResultList = testConsumer.getConsumed();
+ Collection<String> unprocessedResultList = testConsumer.getConsumed();
assertNotNull( unprocessedResultList );
assertEquals( "Incorrect number of unprocessed artifacts detected.", 8, unprocessedResultList.size() );
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorPhase2Test.java b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorPhase2Test.java
index 1adefe033..2d4feecd1 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorPhase2Test.java
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorPhase2Test.java
@@ -58,7 +58,7 @@ public class ArchivaRepositoryScanningTaskExecutorPhase2Test
taskExecutor.executeTask( repoTask );
// check no artifacts processed
- Collection<ArtifactReference> unprocessedResultList = testConsumer.getConsumed();
+ Collection<String> unprocessedResultList = testConsumer.getConsumed();
assertNotNull( unprocessedResultList );
assertEquals( "Incorrect number of unprocessed artifacts detected. No new artifacts should have been found.", 0,
@@ -139,7 +139,7 @@ public class ArchivaRepositoryScanningTaskExecutorPhase2Test
taskExecutor.executeTask( repoTask );
// check no artifacts processed
- Collection<ArtifactReference> unprocessedResultList = testConsumer.getConsumed();
+ Collection<String> unprocessedResultList = testConsumer.getConsumed();
assertNotNull( unprocessedResultList );
assertEquals( "Incorrect number of unprocessed artifacts detected. One new artifact should have been found.", 1,
unprocessedResultList.size() );
@@ -186,7 +186,7 @@ public class ArchivaRepositoryScanningTaskExecutorPhase2Test
taskExecutor.executeTask( repoTask );
// check no artifacts processed
- Collection<ArtifactReference> unprocessedResultList = testConsumer.getConsumed();
+ Collection<String> unprocessedResultList = testConsumer.getConsumed();
assertNotNull( unprocessedResultList );
assertEquals( "Incorrect number of unprocessed artifacts detected. One new artifact should have been found.", 1,
unprocessedResultList.size() );
@@ -219,7 +219,7 @@ public class ArchivaRepositoryScanningTaskExecutorPhase2Test
taskExecutor.executeTask( repoTask );
- Collection<ArtifactReference> unprocessedResultList = testConsumer.getConsumed();
+ Collection<String> unprocessedResultList = testConsumer.getConsumed();
assertNotNull( unprocessedResultList );
assertEquals( "Incorrect number of unprocessed artifacts detected.", 8, unprocessedResultList.size() );
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestConsumer.java b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestConsumer.java
index 7d9cd369a..8dc0f1940 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestConsumer.java
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestConsumer.java
@@ -43,7 +43,7 @@ public class TestConsumer
extends AbstractMonitoredConsumer
implements KnownRepositoryContentConsumer
{
- private Set<ArtifactReference> consumed = new HashSet<ArtifactReference>();
+ private Set<String> consumed = new HashSet<>();
@Inject
private RepositoryContentFactory factory;
@@ -98,11 +98,12 @@ public class TestConsumer
{
try
{
- consumed.add( repository.toArtifactReference( path ) );
+ repository.toItemSelector( path );
+ consumed.add( path );
}
catch ( LayoutException e )
{
- throw new ConsumerException( e.getMessage(), e );
+ // Layout exception for specific paths
}
}
}
@@ -125,7 +126,7 @@ public class TestConsumer
completeScan();
}
- public Collection<ArtifactReference> getConsumed()
+ public Collection<String> getConsumed()
{
return consumed;
}