mirror of https://github.com/apache/archiva.git
Switching to new API
This commit is contained in:
parent
91900a6376
commit
aa8de8c74b
|
@ -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() );
|
||||
|
|
|
@ -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() );
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue