diff options
author | Maria Odea B. Ching <oching@apache.org> | 2007-10-15 11:16:38 +0000 |
---|---|---|
committer | Maria Odea B. Ching <oching@apache.org> | 2007-10-15 11:16:38 +0000 |
commit | 88e4896ee99f1737c651a4bff9e85eb20ca1c566 (patch) | |
tree | a3a4fd029b4f8bdd163a9541989d4a25774ae7af /archiva-database | |
parent | 829e85759e3082663bdefc61f5f8cfc00781384e (diff) | |
download | archiva-88e4896ee99f1737c651a4bff9e85eb20ca1c566.tar.gz archiva-88e4896ee99f1737c651a4bff9e85eb20ca1c566.zip |
[MRM-37 and MRM-527]
- added code for cleaning up the database of artifacts that are no longer existing in the repository
(DatabaseCleanupRemoveArtifactConsumer and DatabaseCleanupRemoveProjectConsumer)
- created tests for database cleanup of removed artifacts
- updated some of the test cases (in archiva-database and archiva-scheduled modules) to reflect the changes in thedb cleanup consumers
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@584735 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-database')
3 files changed, 3 insertions, 6 deletions
diff --git a/archiva-database/src/main/java/org/apache/maven/archiva/database/updater/DatabaseConsumers.java b/archiva-database/src/main/java/org/apache/maven/archiva/database/updater/DatabaseConsumers.java index 4d5884968..01dee02fd 100644 --- a/archiva-database/src/main/java/org/apache/maven/archiva/database/updater/DatabaseConsumers.java +++ b/archiva-database/src/main/java/org/apache/maven/archiva/database/updater/DatabaseConsumers.java @@ -95,7 +95,7 @@ public class DatabaseConsumers DatabaseCleanupConsumer consumer = (DatabaseCleanupConsumer) object; DatabaseScanningConfiguration config = archivaConfiguration.getConfiguration().getDatabaseScanning(); - return config.getUnprocessedConsumers().contains( consumer.getId() ); + return config.getCleanupConsumers().contains( consumer.getId() ); } return satisfies; diff --git a/archiva-database/src/test/java/org/apache/maven/archiva/database/updater/TestDatabaseCleanupConsumer.java b/archiva-database/src/test/java/org/apache/maven/archiva/database/updater/TestDatabaseCleanupConsumer.java index b30f9cef4..0062a8945 100644 --- a/archiva-database/src/test/java/org/apache/maven/archiva/database/updater/TestDatabaseCleanupConsumer.java +++ b/archiva-database/src/test/java/org/apache/maven/archiva/database/updater/TestDatabaseCleanupConsumer.java @@ -70,12 +70,12 @@ public class TestDatabaseCleanupConsumer public String getDescription() { - return "Test Consumer for Database Unprocessed"; + return "Test Consumer for Database Cleanup"; } public String getId() { - return "test-db-unprocessed"; + return "test-db-cleanup"; } public boolean isPermanent() diff --git a/archiva-database/src/test/resources/archiva-test.xml b/archiva-database/src/test/resources/archiva-test.xml index 66021220b..838e6fc67 100644 --- a/archiva-database/src/test/resources/archiva-test.xml +++ b/archiva-database/src/test/resources/archiva-test.xml @@ -146,9 +146,6 @@ </unprocessedConsumers> <cleanupConsumers> <cleanupConsumer>test-db-cleanup</cleanupConsumer> - <cleanupConsumer>not-present-remove-db-artifact</cleanupConsumer> - <cleanupConsumer>not-present-remove-db-project</cleanupConsumer> - <cleanupConsumer>not-present-remove-indexed</cleanupConsumer> </cleanupConsumers> </databaseScanning> |