working test case now that the model bug was found and squashed

git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/branches/archiva-jpox-database-refactor@529337 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jesse McConnell 2007-04-16 17:36:32 +00:00
parent 7052adfc4f
commit 01b7555594
3 changed files with 9 additions and 14 deletions

View File

@ -111,6 +111,7 @@ public class ArchivaScheduledTaskExecutor
try
{
getLogger().info( "Task: Updating unprocessed artifacts" );
databaseUpdater.updateAllUnprocessed();
}
catch ( ArchivaDatabaseException e )
@ -120,6 +121,7 @@ public class ArchivaScheduledTaskExecutor
try
{
getLogger().info( "Task: Updating processed artifacts" );
databaseUpdater.updateAllProcessed();
}
catch ( ArchivaDatabaseException e )

View File

@ -165,12 +165,7 @@
<databaseScanning>
<cronExpression>0 0 * * ?</cronExpression>
<unprocessedConsumers>
<unprocessedConsumer>index-artifact</unprocessedConsumer>
<unprocessedConsumer>update-db-project</unprocessedConsumer>
<unprocessedConsumer>validate-repository-metadata</unprocessedConsumer>
<unprocessedConsumer>index-archive-toc</unprocessedConsumer>
<unprocessedConsumer>update-db-bytecode-stats</unprocessedConsumer>
<unprocessedConsumer>index-public-methods</unprocessedConsumer>
<unprocessedConsumer>update-db-artifact</unprocessedConsumer>
</unprocessedConsumers>
<processedConsumers>
<processedConsumer>not-present-remove-db-artifact</processedConsumer>

View File

@ -179,10 +179,10 @@ public class ArchivaScheduledTaskExecutorTest
assertNotNull( artifact );
List results = dao.getArtifactDAO().queryArtifacts( new ArtifactsProcessedConstraint( false ) );
List unprocessedResultList = adao.queryArtifacts( new ArtifactsProcessedConstraint( false ) );
assertNotNull( results );
assertEquals("Incorrect number of unprocessed artifacts detected.", results.size(), 8 );
assertNotNull( unprocessedResultList );
assertEquals("Incorrect number of unprocessed artifacts detected.", 8, unprocessedResultList.size() );
DatabaseTask dataTask = new DatabaseTask();
@ -190,12 +190,10 @@ public class ArchivaScheduledTaskExecutorTest
taskExecutor.executeTask( dataTask );
List newResults = dao.getArtifactDAO().queryArtifacts( new ArtifactsProcessedConstraint( false ) );
assertNotNull( newResults );
assertEquals("Incorrect number of unprocessed artifacts detected.", newResults.size(), 0 );
assertEquals("Incorrect number of processed artifacts detected.", newResults.size(), 8 );
List processedResultList = adao.queryArtifacts( new ArtifactsProcessedConstraint( true ) );
assertNotNull( processedResultList );
assertEquals("Incorrect number of processed artifacts detected.", 8, processedResultList.size() );
}