diff options
author | Jesse McConnell <jmcconnell@apache.org> | 2007-04-16 17:36:32 +0000 |
---|---|---|
committer | Jesse McConnell <jmcconnell@apache.org> | 2007-04-16 17:36:32 +0000 |
commit | 01b7555594057dad01635122d58ad739c87b34e8 (patch) | |
tree | 572685281b9d5e35d2daf7b71068f62177d8901e | |
parent | 7052adfc4fd28ffc8451a7cc694ec3199c6d46e9 (diff) | |
download | archiva-01b7555594057dad01635122d58ad739c87b34e8.tar.gz archiva-01b7555594057dad01635122d58ad739c87b34e8.zip |
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
3 files changed, 9 insertions, 14 deletions
diff --git a/archiva-scheduled/src/main/java/org/apache/maven/archiva/scheduled/executors/ArchivaScheduledTaskExecutor.java b/archiva-scheduled/src/main/java/org/apache/maven/archiva/scheduled/executors/ArchivaScheduledTaskExecutor.java index 0a8903f91..047e93296 100644 --- a/archiva-scheduled/src/main/java/org/apache/maven/archiva/scheduled/executors/ArchivaScheduledTaskExecutor.java +++ b/archiva-scheduled/src/main/java/org/apache/maven/archiva/scheduled/executors/ArchivaScheduledTaskExecutor.java @@ -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 ) diff --git a/archiva-scheduled/src/test/conf/repository-manager.xml b/archiva-scheduled/src/test/conf/repository-manager.xml index 07e9f969b..9e3597358 100644 --- a/archiva-scheduled/src/test/conf/repository-manager.xml +++ b/archiva-scheduled/src/test/conf/repository-manager.xml @@ -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> diff --git a/archiva-scheduled/src/test/java/org/apache/maven/archiva/scheduled/executors/ArchivaScheduledTaskExecutorTest.java b/archiva-scheduled/src/test/java/org/apache/maven/archiva/scheduled/executors/ArchivaScheduledTaskExecutorTest.java index 7a60d5f99..71a4ff540 100644 --- a/archiva-scheduled/src/test/java/org/apache/maven/archiva/scheduled/executors/ArchivaScheduledTaskExecutorTest.java +++ b/archiva-scheduled/src/test/java/org/apache/maven/archiva/scheduled/executors/ArchivaScheduledTaskExecutorTest.java @@ -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() ); } |