*/
import junit.framework.TestCase;
+import org.apache.archiva.configuration.ArchivaConfiguration;
+import org.apache.archiva.configuration.ManagedRepositoryConfiguration;
import org.apache.archiva.metadata.repository.MetadataRepository;
import org.apache.archiva.metadata.repository.TestRepositorySessionFactory;
import org.apache.archiva.metadata.repository.stats.RepositoryStatisticsManager;
-import org.apache.archiva.configuration.ArchivaConfiguration;
-import org.apache.archiva.configuration.ManagedRepositoryConfiguration;
import org.codehaus.plexus.taskqueue.execution.TaskExecutor;
import org.codehaus.plexus.util.FileUtils;
import org.junit.After;
@Named( value = "taskExecutor#test-repository-scanning" )
protected TaskExecutor taskExecutor;
- @Inject @Named(value = "archivaConfiguration#test-repository-scanning")
+ @Inject
+ @Named( value = "archivaConfiguration#test-repository-scanning" )
protected ArchivaConfiguration archivaConfig;
@Inject
- @Named(value = "repositoryStatisticsManager#test")
+ @Named( value = "repositoryStatisticsManager#test" )
protected RepositoryStatisticsManager repositoryStatisticsManager;
@Inject
super.tearDown();
}
-
+
}
/**
* ArchivaRepositoryScanningTaskExecutorPhase1Test
- *
+ *
* @version $Id: ArchivaRepositoryScanningTaskExecutorPhase1Test.java 1214303 2011-12-14 15:37:51Z olamy $
*/
@RunWith( SpringJUnit4ClassRunner.class )
@ContextConfiguration( locations = { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context.xml" } )
public class ArchivaRepositoryScanningTaskExecutorPhase1Test
extends ArchivaRepositoryScanningTaskExecutorAbstractTest
-{
+{
// Split of ArchivaRepositoryScanningTaskExecutorTest should be executed first
// to avoid testConsumer in unknown state if member of Phase2 all ready executed
@Test
RepositoryTask repoTask = new RepositoryTask();
repoTask.setRepositoryId( TEST_REPO_ID );
-
+
taskExecutor.executeTask( repoTask );
Collection<ArtifactReference> unprocessedResultList = testConsumer.getConsumed();
assertNotNull( unprocessedResultList );
assertEquals( "Incorrect number of unprocessed artifacts detected.", 8, unprocessedResultList.size() );
-
+
}
-
+
}
File newArtifactGroup = new File( repoDir, "org/apache/archiva" );
assertFalse( "newArtifactGroup should not exist.", newArtifactGroup.exists() );
-
+
FileUtils.copyDirectoryStructure( new File( "target/test-classes/test-repo/org/apache/archiva" ),
newArtifactGroup );
File newArtifactGroup = new File( repoDir, "org/apache/archiva" );
assertFalse( "newArtifactGroup should not exist.", newArtifactGroup.exists() );
-
+
FileUtils.copyDirectoryStructure( new File( "target/test-classes/test-repo/org/apache/archiva" ),
newArtifactGroup );
File newArtifactGroup = new File( repoDir, "org/apache/archiva" );
assertFalse( "newArtifactGroup should not exist.", newArtifactGroup.exists() );
-
+
FileUtils.copyDirectoryStructure( new File( "target/test-classes/test-repo/org/apache/archiva" ),
newArtifactGroup );