diff options
author | Olivier Lamy <olamy@apache.org> | 2011-08-19 17:15:41 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2011-08-19 17:15:41 +0000 |
commit | 94faa497aea1f08226d4eb0a2121596488ab89a3 (patch) | |
tree | 0d8d976ac6a36f7ad9747b2922d0ee034a9ec366 | |
parent | 23cceb8c62b655be0a3528c334d1a23e8aa5ba5b (diff) | |
download | archiva-94faa497aea1f08226d4eb0a2121596488ab89a3.tar.gz archiva-94faa497aea1f08226d4eb0a2121596488ab89a3.zip |
fix webapp unit tests with commenting a spring which is not used and override the good one
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1159691 13f79535-47bb-0310-9956-ffa450edef68
7 files changed, 46 insertions, 97 deletions
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/components-fragment.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/components-fragment.xml deleted file mode 100644 index d472d5a56..000000000 --- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/components-fragment.xml +++ /dev/null @@ -1,63 +0,0 @@ -<?xml version="1.0" ?> -<!-- - ~ Licensed to the Apache Software Foundation (ASF) under one - ~ or more contributor license agreements. See the NOTICE file - ~ distributed with this work for additional information - ~ regarding copyright ownership. The ASF licenses this file - ~ to you under the Apache License, Version 2.0 (the - ~ "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 - ~ - ~ 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 - ~ KIND, either express or implied. See the License for the - ~ specific language governing permissions and limitations - ~ under the License. - --> - -<component-set> - <components> - <!-- - | - | Repository Scanning Task Queue / Executor - | - --> - <component> - <role>org.codehaus.plexus.taskqueue.TaskQueue</role> - <role-hint>repository-scanning</role-hint> - <implementation>org.codehaus.plexus.taskqueue.DefaultTaskQueue</implementation> - <lifecycle-handler>plexus-configurable</lifecycle-handler> - <configuration> - <task-entry-evaluators> - </task-entry-evaluators> - <task-exit-evaluators> - </task-exit-evaluators> - <task-viability-evaluators> - </task-viability-evaluators> - </configuration> - </component> - - <component> - <role>org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor</role> - <role-hint>repository-scanning</role-hint> - <implementation>org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor</implementation> - <instantiation-strategy>singleton</instantiation-strategy> - <requirements> - <requirement> - <role>org.codehaus.plexus.taskqueue.execution.TaskExecutor</role> - <role-hint>repository-scanning</role-hint> - </requirement> - <requirement> - <role>org.codehaus.plexus.taskqueue.TaskQueue</role> - <role-hint>repository-scanning</role-hint> - </requirement> - </requirements> - <configuration> - <name>repository-scanning</name> - </configuration> - </component> - </components> -</component-set> diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/resources/META-INF/spring-context.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/resources/META-INF/spring-context.xml index 2fd029c41..702cf13a0 100755 --- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/resources/META-INF/spring-context.xml +++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/resources/META-INF/spring-context.xml @@ -1,4 +1,4 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <!-- ~ Licensed to the Apache Software Foundation (ASF) under one @@ -41,6 +41,10 @@ </bean> <alias name="archivaTaskScheduler#repository" alias="scheduler#repository"/> + <!-- + olamy we can use this if one day we move away from the old plexus stuff :-) + btw comment this as it breaks unit tests in web as depending on classloader loading + it override beans with same name but with type org.codehaus.redback.components.scheduler.DefaultScheduler <task:scheduler id="scheduler" pool-size="10"/> - + --> </beans>
\ No newline at end of file diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/resources/archiva-test.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/resources/archiva-test.xml index f921d6613..0c1f93c8f 100644 --- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/resources/archiva-test.xml +++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/resources/archiva-test.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> +<?xml version="1.0" encoding="UTF-8"?> <!-- ~ Licensed to the Apache Software Foundation (ASF) under one ~ or more contributor license agreements. See the NOTICE file diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/resources/spring-context.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/resources/spring-context.xml index 35596bb60..8b0a94cb7 100755 --- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/resources/spring-context.xml +++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/resources/spring-context.xml @@ -40,32 +40,6 @@ <alias name="repositoryStatisticsManager#test" alias="repositoryStatisticsManager#default"/> - <!-- - <component> - <role>org.codehaus.plexus.taskqueue.execution.TaskExecutor</role> - <role-hint>test-repository-scanning</role-hint> - <implementation>org.apache.archiva.scheduler.repository.ArchivaRepositoryScanningTaskExecutor - </implementation> - <requirements> - <requirement> - <role>org.apache.maven.archiva.configuration.ArchivaConfiguration</role> - <field-name>archivaConfiguration</field-name> - <role-hint>test-repository-scanning</role-hint> - </requirement> - <requirement> - <role>org.apache.archiva.repository.scanner.RepositoryScanner</role> - <field-name>repoScanner</field-name> - </requirement> - <requirement> - <role>org.apache.archiva.metadata.repository.stats.RepositoryStatisticsManager</role> - </requirement> - <requirement> - <role>org.apache.archiva.metadata.repository.RepositorySessionFactory</role> - </requirement> - </requirements> - </component> - --> - <bean name="archivaConfiguration#test-repository-scanning" class="org.apache.maven.archiva.configuration.DefaultArchivaConfiguration"> <property name="registry" ref="registry#test-configured"/> </bean> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/META-INF/spring-context.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/META-INF/spring-context.xml new file mode 100644 index 000000000..b5890469f --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/META-INF/spring-context.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "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 + ~ + ~ 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 + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> + + <bean name="scheduler" class="org.codehaus.redback.components.scheduler.DefaultScheduler"> + <property name="properties"> + <props> + <prop key="org.quartz.scheduler.instanceName">scheduler1</prop> + <prop key="org.quartz.threadPool.class">org.quartz.simpl.SimpleThreadPool</prop> + <prop key="org.quartz.threadPool.threadCount">2</prop> + <prop key="org.quartz.threadPool.threadPriority">4</prop> + <prop key="org.quartz.jobStore.class">org.quartz.simpl.RAMJobStore</prop> + </props> + </property> + </bean> +</beans>
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/webapp/WEB-INF/feedServletTest-web.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/webapp/WEB-INF/feedServletTest-web.xml index 0e8e38ec5..69ae36009 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/webapp/WEB-INF/feedServletTest-web.xml +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/webapp/WEB-INF/feedServletTest-web.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> +<?xml version="1.0" encoding="UTF-8"?> <!-- ~ Licensed to the Apache Software Foundation (ASF) under one ~ or more contributor license agreements. See the NOTICE file diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/resources/WEB-INF/repository-servlet-security-test/web.xml b/archiva-modules/archiva-web/archiva-webdav/src/test/resources/WEB-INF/repository-servlet-security-test/web.xml index 69ef84322..1897fd4be 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/test/resources/WEB-INF/repository-servlet-security-test/web.xml +++ b/archiva-modules/archiva-web/archiva-webdav/src/test/resources/WEB-INF/repository-servlet-security-test/web.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> +<?xml version="1.0" encoding="UTF-8"?> <!-- ~ Licensed to the Apache Software Foundation (ASF) under one ~ or more contributor license agreements. See the NOTICE file @@ -40,7 +40,4 @@ </param-value> </context-param> - <!-- - target/test-classes/org/apache/maven/archiva/webdav/RepositoryServletSecurityTest.xml - --> </web-app> |