diff options
author | Martin Stockhammer <martin_s@apache.org> | 2021-12-24 16:29:21 +0100 |
---|---|---|
committer | Martin Stockhammer <martin_s@apache.org> | 2021-12-24 16:29:21 +0100 |
commit | ff068497463318d18b001bf17f04271099cdd5d4 (patch) | |
tree | 9073d73b7837085c571df94dfccdb2e70f61d6c7 | |
parent | a8fa3d574b674c02d837d61c3a483849a454269e (diff) | |
download | archiva-ff068497463318d18b001bf17f04271099cdd5d4.tar.gz archiva-ff068497463318d18b001bf17f04271099cdd5d4.zip |
Refactoring packages for mock classes
11 files changed, 15 insertions, 23 deletions
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/conf/repository-manager.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/conf/repository-manager.xml index 384891f04..8a42a291f 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/conf/repository-manager.xml +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/conf/repository-manager.xml @@ -24,7 +24,7 @@ <managedRepository> <id>internal</id> <name>Archiva Managed Internal Repository</name> - <location>file://${appserver.base}/repositories/internal</location> + <location>${appserver.base}/repositories/internal</location> <indexDir>${appserver.base}/repositories/internal/.indexer</indexDir> <layout>default</layout> <releases>true</releases> @@ -35,7 +35,7 @@ <managedRepository> <id>snapshots</id> <name>Archiva Managed Snapshot Repository</name> - <location>file://${appserver.base}/repositories/snapshots</location> + <location>${appserver.base}/repositories/snapshots</location> <indexDir>.indexer</indexDir> <layout>default</layout> <releases>false</releases> @@ -46,7 +46,7 @@ <managedRepository> <id>test-repo</id> <name>Test Repository</name> - <location>file://${appserver.base}/test-repo</location> + <location>${appserver.base}/test-repo</location> <layout>default</layout> <releases>true</releases> <snapshots>true</snapshots> diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/repository/mock/RepositoryProviderMock.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/mock/repository/RepositoryProviderMock.java index 0c8f71f14..a74ae2461 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/repository/mock/RepositoryProviderMock.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/mock/repository/RepositoryProviderMock.java @@ -1,4 +1,4 @@ -package org.apache.archiva.repository.mock; +package org.apache.archiva.consumers.core.mock.repository; /* * Licensed to the Apache Software Foundation (ASF) under one @@ -9,8 +9,7 @@ package org.apache.archiva.repository.mock; * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-purge-consumer-test.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-purge-consumer-test.xml index 2f1521abc..0657f9551 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-purge-consumer-test.xml +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-purge-consumer-test.xml @@ -28,7 +28,7 @@ default-lazy-init="true"> <context:annotation-config/> - <context:component-scan base-package="org.apache.archiva.metadata.repository,org.apache.archiva.repository.maven.content"/> + <context:component-scan base-package="org.apache.archiva.metadata.repository,org.apache.archiva.maven.repository.content"/> <!-- for testing repo purge using retention count --> diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context.xml index 1e1030ff0..a0014e153 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context.xml +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context.xml @@ -27,7 +27,7 @@ http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd" default-lazy-init="true"> <context:annotation-config/> - <context:component-scan base-package="org.apache.archiva.metadata.repository,org.apache.archiva.repository.maven.content,org.apache.archiva.maven.metadata"/> + <context:component-scan base-package="org.apache.archiva.metadata.repository,org.apache.archiva.maven.repository.content,org.apache.archiva.maven.metadata"/> <bean name="commons-configuration" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry"> <property name="initialConfiguration"> diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletTestCase.java b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletTestCase.java index 73f181f39..22d7c58a5 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletTestCase.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletTestCase.java @@ -35,7 +35,7 @@ import org.apache.archiva.repository.RepositoryException; import org.apache.archiva.repository.base.ArchivaRepositoryRegistry; import org.apache.archiva.repository.base.RepositoryHandlerDependencies; import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; -import org.apache.archiva.webdav.httpunit.MkColMethodWebRequest; +import org.apache.archiva.webdav.mock.httpunit.MkColMethodWebRequest; import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/RepositoryServletDeployTest.java b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/RepositoryServletDeployTest.java index 3b170401a..e29190aac 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/RepositoryServletDeployTest.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/RepositoryServletDeployTest.java @@ -22,7 +22,7 @@ package org.apache.archiva.webdav; import com.gargoylesoftware.htmlunit.WebRequest; import com.gargoylesoftware.htmlunit.WebResponse; import org.apache.archiva.configuration.ManagedRepositoryConfiguration; -import org.apache.archiva.webdav.httpunit.MkColMethodWebRequest; +import org.apache.archiva.webdav.mock.httpunit.MkColMethodWebRequest; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/RepositoryServletSecurityTest.java b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/RepositoryServletSecurityTest.java index 6713786ed..36e1f1dca 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/RepositoryServletSecurityTest.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/RepositoryServletSecurityTest.java @@ -34,7 +34,7 @@ import org.apache.archiva.redback.system.SecuritySession; import org.apache.archiva.redback.users.User; import org.apache.archiva.redback.users.memory.SimpleUser; import org.apache.archiva.repository.RepositoryRegistry; -import org.apache.archiva.metadata.audit.TestAuditListener; +import org.apache.archiva.webdav.mock.metadata.audit.TestAuditListener; import org.apache.archiva.repository.base.group.RepositoryGroupHandler; import org.apache.archiva.security.ServletAuthenticator; import org.apache.archiva.security.common.ArchivaRoleConstants; diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/httpunit/MkColMethodWebRequest.java b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/mock/httpunit/MkColMethodWebRequest.java index 7702a9ce1..1e091bfff 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/httpunit/MkColMethodWebRequest.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/mock/httpunit/MkColMethodWebRequest.java @@ -1,4 +1,4 @@ -package org.apache.archiva.webdav.httpunit; +package org.apache.archiva.webdav.mock.httpunit; /* * Licensed to the Apache Software Foundation (ASF) under one @@ -9,8 +9,7 @@ package org.apache.archiva.webdav.httpunit; * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/metadata/audit/TestAuditListener.java b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/mock/metadata/audit/TestAuditListener.java index 7f4a9538d..f8d0af173 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/metadata/audit/TestAuditListener.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/mock/metadata/audit/TestAuditListener.java @@ -1,4 +1,4 @@ -package org.apache.archiva.metadata.audit; +package org.apache.archiva.webdav.mock.metadata.audit; /* * Licensed to the Apache Software Foundation (ASF) under one @@ -9,8 +9,7 @@ package org.apache.archiva.metadata.audit; * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -19,6 +18,7 @@ package org.apache.archiva.metadata.audit; * under the License. */ +import org.apache.archiva.metadata.audit.AuditListener; import org.apache.archiva.metadata.model.facets.AuditEvent; import java.util.ArrayList; diff --git a/archiva-modules/metadata/metadata-store-provider/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/DefaultCassandraArchivaManager.java b/archiva-modules/metadata/metadata-store-provider/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/DefaultCassandraArchivaManager.java index 720f1a912..df53f600b 100644 --- a/archiva-modules/metadata/metadata-store-provider/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/DefaultCassandraArchivaManager.java +++ b/archiva-modules/metadata/metadata-store-provider/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/DefaultCassandraArchivaManager.java @@ -180,7 +180,6 @@ public class DefaultCassandraArchivaManager List<String> hostNames = new ArrayList<>( ); hostNames.add( cassandraHost + ":" + cassandraPort ); - System.out.println( "Contact point: " + cassandraHost + ":" + cassandraPort ); configLoader = DriverConfigLoader.programmaticBuilder( ) diff --git a/archiva-modules/metadata/metadata-store-provider/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepositoryTest.java b/archiva-modules/metadata/metadata-store-provider/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepositoryTest.java index ccdb3039f..a6c4bf0fe 100644 --- a/archiva-modules/metadata/metadata-store-provider/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepositoryTest.java +++ b/archiva-modules/metadata/metadata-store-provider/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepositoryTest.java @@ -95,9 +95,7 @@ public class CassandraMetadataRepositoryTest throws Exception { cTime = System.currentTimeMillis( ); - System.err.println( "Setting up - "+(testNum++) + " - " + testInfo.getDisplayName() + " - 0ms"); super.setUp(); - System.err.println( "Setting up - " + testInfo.getDisplayName( ) + " - " + (System.currentTimeMillis( ) - cTime) +"ms"); assertMaxTries =1; assertRetrySleepMs=10; @@ -126,7 +124,6 @@ public class CassandraMetadataRepositoryTest { clearReposAndNamespace( cassandraArchivaManager, clearedTables ); } - System.err.println( "Finished setting up - "+testInfo.getDisplayName() + " - " + (System.currentTimeMillis( ) - cTime) +"ms"); } /** @@ -165,10 +162,8 @@ public class CassandraMetadataRepositoryTest public void shutdown(TestInfo testInfo) throws Exception { - System.err.println( "Shutting down - " + (testNum-1) + " - " + testInfo.getDisplayName( ) + " - " + ( System.currentTimeMillis( ) - cTime ) +"ms"); clearReposAndNamespace( cassandraArchivaManager, clearedTables ); super.tearDown(); - System.err.println( "Shutting down finished - " + testInfo.getDisplayName( ) + " - " + ( System.currentTimeMillis( ) - cTime ) +"ms"); } static void clearReposAndNamespace( final CassandraArchivaManager cassandraArchivaManager, final AtomicBoolean clearedFlag ) |