You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltaspike.apache.org by st...@apache.org on 2012/07/06 15:05:57 UTC
[3/5] git commit: DELTASPIKE-224 remove core/integration-test module
DELTASPIKE-224 remove core/integration-test module
not needed anymore as those tests can now be executed
directly in core/impl
Project: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/commit/a24d38bb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/tree/a24d38bb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/diff/a24d38bb
Branch: refs/heads/master
Commit: a24d38bb1c3f9dd6eb58b23b2912a230d6571a2a
Parents: dcd3e23
Author: Mark Struberg <st...@apache.org>
Authored: Fri Jul 6 13:47:41 2012 +0200
Committer: Mark Struberg <st...@apache.org>
Committed: Fri Jul 6 13:47:41 2012 +0200
----------------------------------------------------------------------
deltaspike/core/integration-test/pom.xml | 174 --------------
.../core/api/exclude/ExcludeIntegrationTest.java | 175 ---------------
.../core/api/exclude/IntegrationTestBean.java | 30 ---
.../core/api/exclude/IntegrationTestDbBean.java | 29 ---
.../META-INF/apache-deltaspike.properties | 22 --
.../src/test/resources/META-INF/beans.xml | 23 --
.../test.javax.enterprise.inject.spi.Extension | 21 --
deltaspike/core/pom.xml | 3 -
8 files changed, 0 insertions(+), 477 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/a24d38bb/deltaspike/core/integration-test/pom.xml
----------------------------------------------------------------------
diff --git a/deltaspike/core/integration-test/pom.xml b/deltaspike/core/integration-test/pom.xml
deleted file mode 100644
index a002784..0000000
--- a/deltaspike/core/integration-test/pom.xml
+++ /dev/null
@@ -1,174 +0,0 @@
-<?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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.deltaspike</groupId>
- <artifactId>parent-it</artifactId>
- <version>0.3-incubating-SNAPSHOT</version>
- <relativePath>../../parent/it/pom.xml</relativePath>
- </parent>
-
- <description>Integration Test Suite</description>
- <groupId>org.apache.deltaspike.test</groupId>
- <artifactId>core-integration-test</artifactId>
- <packaging>jar</packaging>
-
- <name>Apache DeltaSpike Core Integration Test Suite</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-library</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.deltaspike.core</groupId>
- <artifactId>deltaspike-core-api</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.deltaspike.core</groupId>
- <artifactId>deltaspike-core-impl</artifactId>
- <version>${project.version}</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.deltaspike.core</groupId>
- <artifactId>deltaspike-core-impl</artifactId>
- <version>${project.version}</version>
- <classifier>tests</classifier>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>${maven.surefire.plugin.version}</version>
- <configuration>
- <skip>true</skip>
- <!-- Skip the tests normally -->
- <!-- Groups need to be setup for each profile -->
- <parallel>none</parallel>
- <includes>
- <include>**/*Test.java</include>
- </includes>
- </configuration>
-
- <executions>
- <execution>
- <id>surefire-integration-tests</id>
- <phase>integration-test</phase>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <skip>false</skip>
- <redirectTestOutputToFile>true</redirectTestOutputToFile>
- <trimStackTrace>false</trimStackTrace>
- <printSummary>true</printSummary>
- </configuration>
- </execution>
- <execution>
- <id>run-core-tests</id>
- <phase>integration-test</phase>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <testClassesDirectory>${project.build.directory}/coretests/</testClassesDirectory>
- <skip>false</skip>
- <redirectTestOutputToFile>true</redirectTestOutputToFile>
- <trimStackTrace>false</trimStackTrace>
- <printSummary>true</printSummary>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </pluginManagement>
-
- <plugins>
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <groupId>org.apache.maven.plugins</groupId>
- <executions>
- <execution>
- <id>unpack</id>
- <phase>process-test-classes</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <!--
- We just need to unpack our Test classes for the surefire runner to
- pick up the tests. All other test resources are available via the
- dependency to the core-impl-tests anyway.
- -->
- <includes>**/*Test.class</includes>
- <excludes>org.apache.deltaspike.test.core.api.projectstage.*</excludes>
- <artifactItems>
- <artifactItem>
- <groupId>org.apache.deltaspike.core</groupId>
- <artifactId>deltaspike-core-impl</artifactId>
- <version>${project.version}</version>
- <classifier>tests</classifier>
- <outputDirectory>${project.build.directory}/coretests/</outputDirectory>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <!--
- The core tests require arquillian.xml to run successfully. We cannot simply
- include "src/test/resources" on the classpath for the test execution because
- the other files in there clash with the ones packaged in core's test jar.
- -->
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-arquillian-xml</id>
- <phase>process-test-classes</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <copy file="${basedir}/src/test/resources/arquillian.xml" todir="${project.build.directory}/coretests/" />
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/a24d38bb/deltaspike/core/integration-test/src/test/java/org/apache/deltaspike/integration/core/api/exclude/ExcludeIntegrationTest.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/integration-test/src/test/java/org/apache/deltaspike/integration/core/api/exclude/ExcludeIntegrationTest.java b/deltaspike/core/integration-test/src/test/java/org/apache/deltaspike/integration/core/api/exclude/ExcludeIntegrationTest.java
deleted file mode 100644
index 4e54337..0000000
--- a/deltaspike/core/integration-test/src/test/java/org/apache/deltaspike/integration/core/api/exclude/ExcludeIntegrationTest.java
+++ /dev/null
@@ -1,175 +0,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.
-*/
-package org.apache.deltaspike.integration.core.api.exclude;
-
-
-import org.apache.deltaspike.core.api.projectstage.ProjectStage;
-import org.apache.deltaspike.core.api.provider.BeanProvider;
-import org.apache.deltaspike.core.util.ProjectStageProducer;
-import org.apache.deltaspike.test.category.WebProfileCategory;
-import org.apache.deltaspike.test.core.api.exclude.AlwaysActiveBean;
-import org.apache.deltaspike.test.core.api.exclude.CustomExpressionBasedBean;
-import org.apache.deltaspike.test.core.api.exclude.CustomExpressionBasedNoBean;
-import org.apache.deltaspike.test.core.api.exclude.NoBean;
-import org.apache.deltaspike.test.core.api.exclude.ProdDbBean;
-import org.apache.deltaspike.test.core.api.exclude.StdBean;
-import org.apache.deltaspike.test.util.ArchiveUtils;
-import org.apache.deltaspike.test.util.FileUtils;
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.shrinkwrap.api.ShrinkWrap;
-import org.jboss.shrinkwrap.api.asset.EmptyAsset;
-import org.jboss.shrinkwrap.api.spec.JavaArchive;
-import org.jboss.shrinkwrap.api.spec.WebArchive;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.runner.RunWith;
-
-import java.net.URL;
-
-/**
- * Integration tests for {@link org.apache.deltaspike.core.api.exclude.annotation.Exclude}
- */
-@RunWith(Arquillian.class)
-@Category(WebProfileCategory.class)
-public class ExcludeIntegrationTest
-{
- /**
- * Deploy package classes with project-stage integration-test
- */
- @Deployment
- public static WebArchive deploy()
- {
- URL deltaSpikeConfig = ExcludeIntegrationTest.class.getClassLoader()
- .getResource("META-INF/apache-deltaspike.properties");
-
- URL testExtensionsFileUrl = ExcludeIntegrationTest.class.getClassLoader()
- .getResource("META-INF/services/test.javax.enterprise.inject.spi.Extension");
-
- JavaArchive testJar = ShrinkWrap.create(JavaArchive.class, "excludeIntegrationTest.jar")
- .addPackage("org.apache.deltaspike.test.core.api.exclude")
- .addPackage("org.apache.deltaspike.test.core.impl.activation")
- .addPackage("org.apache.deltaspike.test.category")
- .addPackage("org.apache.deltaspike.integration.core.api.exclude")
- .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
-
- return ShrinkWrap.create(WebArchive.class, "excludeIntegration.war")
- .addAsLibraries(ArchiveUtils.getDeltaSpikeCoreArchive())
- .addAsLibraries(testJar)
- .addAsResource(FileUtils.getFileForURL(deltaSpikeConfig.toString()),
- "META-INF/apache-deltaspike.properties")
- .addAsResource(FileUtils.getFileForURL(testExtensionsFileUrl.toString()),
- "META-INF/services/javax.enterprise.inject.spi.Extension")
- .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
- }
-
- /**
- * check project-stage to ensure the correct config for the other tests in this class
- */
- @Test
- public void checkProjectStage()
- {
- Assert.assertEquals(ProjectStage.IntegrationTest, ProjectStageProducer.getInstance().getProjectStage());
- }
-
- /**
- * check if this package is included at all
- */
- @Test
- public void simpleCheckOfBeansInPackage()
- {
- AlwaysActiveBean testBean = BeanProvider.getContextualReference(AlwaysActiveBean.class, true);
-
- Assert.assertNotNull(testBean);
- }
-
- /**
- * bean is excluded in any case
- */
- @Test
- public void excludeWithoutCondition()
- {
- NoBean noBean = BeanProvider.getContextualReference(NoBean.class, true);
-
- Assert.assertNull(noBean);
- }
-
- /**
- * bean excluded in case of project-stage integration-test
- */
- @Test
- public void excludeInCaseOfProjectStageIntegrationTest()
- {
- StdBean stdBean = BeanProvider.getContextualReference(StdBean.class, true);
-
- Assert.assertNull(stdBean);
- }
-
- /**
- * bean included in case of project-stage integration-test
- */
- @Test
- public void includedInCaseOfProjectStageIntegrationTest()
- {
- IntegrationTestBean integrationTestBean = BeanProvider.getContextualReference(IntegrationTestBean.class, true);
-
- Assert.assertNotNull(integrationTestBean);
- }
-
- /**
- * beans de-/activated via expressions
- */
- @Test
- public void excludedIfExpressionMatch()
- {
- ProdDbBean prodDbBean = BeanProvider.getContextualReference(ProdDbBean.class, true);
-
- Assert.assertNull(prodDbBean);
-
- IntegrationTestDbBean integrationTestDbBean =
- BeanProvider.getContextualReference(IntegrationTestDbBean.class, true);
-
- Assert.assertNotNull(integrationTestDbBean);
- }
-
- /**
- * bean excluded based on a custom expression syntax
- */
- @Test
- public void excludedBasedOnCustomExpressionSyntax()
- {
- CustomExpressionBasedNoBean noBean =
- BeanProvider.getContextualReference(CustomExpressionBasedNoBean.class, true);
-
- Assert.assertNull(noBean);
- }
-
- /**
- * bean included based on a custom expression syntax
- */
- @Test
- public void includedBasedOnCustomExpressionSyntax()
- {
- CustomExpressionBasedBean bean =
- BeanProvider.getContextualReference(CustomExpressionBasedBean.class, true);
-
- Assert.assertNotNull(bean);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/a24d38bb/deltaspike/core/integration-test/src/test/java/org/apache/deltaspike/integration/core/api/exclude/IntegrationTestBean.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/integration-test/src/test/java/org/apache/deltaspike/integration/core/api/exclude/IntegrationTestBean.java b/deltaspike/core/integration-test/src/test/java/org/apache/deltaspike/integration/core/api/exclude/IntegrationTestBean.java
deleted file mode 100644
index 14b2fcd..0000000
--- a/deltaspike/core/integration-test/src/test/java/org/apache/deltaspike/integration/core/api/exclude/IntegrationTestBean.java
+++ /dev/null
@@ -1,30 +0,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.
-*/
-package org.apache.deltaspike.integration.core.api.exclude;
-
-import org.apache.deltaspike.core.api.exclude.annotation.Exclude;
-import org.apache.deltaspike.core.api.projectstage.ProjectStage;
-
-/**
- * Class which gets only included in case of project-stage integration-test
- */
-@Exclude(exceptIfProjectStage = ProjectStage.IntegrationTest.class)
-public class IntegrationTestBean
-{
-}
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/a24d38bb/deltaspike/core/integration-test/src/test/java/org/apache/deltaspike/integration/core/api/exclude/IntegrationTestDbBean.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/integration-test/src/test/java/org/apache/deltaspike/integration/core/api/exclude/IntegrationTestDbBean.java b/deltaspike/core/integration-test/src/test/java/org/apache/deltaspike/integration/core/api/exclude/IntegrationTestDbBean.java
deleted file mode 100644
index b7dc84a..0000000
--- a/deltaspike/core/integration-test/src/test/java/org/apache/deltaspike/integration/core/api/exclude/IntegrationTestDbBean.java
+++ /dev/null
@@ -1,29 +0,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.
-*/
-package org.apache.deltaspike.integration.core.api.exclude;
-
-import org.apache.deltaspike.core.api.exclude.annotation.Exclude;
-
-/**
- * Class which gets excluded if the configured value for 'db' is 'prodDB'
- */
-@Exclude(onExpression = "db==prodDB")
-public class IntegrationTestDbBean
-{
-}
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/a24d38bb/deltaspike/core/integration-test/src/test/resources/META-INF/apache-deltaspike.properties
----------------------------------------------------------------------
diff --git a/deltaspike/core/integration-test/src/test/resources/META-INF/apache-deltaspike.properties b/deltaspike/core/integration-test/src/test/resources/META-INF/apache-deltaspike.properties
deleted file mode 100644
index 1957890..0000000
--- a/deltaspike/core/integration-test/src/test/resources/META-INF/apache-deltaspike.properties
+++ /dev/null
@@ -1,22 +0,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.
-
-deltaspike_ordinal=1001
-
-org.apache.deltaspike.ProjectStage=IntegrationTest
-db=itDb
-
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/a24d38bb/deltaspike/core/integration-test/src/test/resources/META-INF/beans.xml
----------------------------------------------------------------------
diff --git a/deltaspike/core/integration-test/src/test/resources/META-INF/beans.xml b/deltaspike/core/integration-test/src/test/resources/META-INF/beans.xml
deleted file mode 100644
index 4070730..0000000
--- a/deltaspike/core/integration-test/src/test/resources/META-INF/beans.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?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://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
-</beans>
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/a24d38bb/deltaspike/core/integration-test/src/test/resources/META-INF/services/test.javax.enterprise.inject.spi.Extension
----------------------------------------------------------------------
diff --git a/deltaspike/core/integration-test/src/test/resources/META-INF/services/test.javax.enterprise.inject.spi.Extension b/deltaspike/core/integration-test/src/test/resources/META-INF/services/test.javax.enterprise.inject.spi.Extension
deleted file mode 100644
index 60f60e7..0000000
--- a/deltaspike/core/integration-test/src/test/resources/META-INF/services/test.javax.enterprise.inject.spi.Extension
+++ /dev/null
@@ -1,21 +0,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.
-#####################################################################################
-
-org.apache.deltaspike.core.api.provider.BeanManagerProvider
-org.apache.deltaspike.core.impl.exclude.extension.ExcludeExtension
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/a24d38bb/deltaspike/core/pom.xml
----------------------------------------------------------------------
diff --git a/deltaspike/core/pom.xml b/deltaspike/core/pom.xml
index 52d8230..02a9845 100644
--- a/deltaspike/core/pom.xml
+++ b/deltaspike/core/pom.xml
@@ -36,9 +36,6 @@
<modules>
<module>api</module>
<module>impl</module>
-<!--X ITs run with impl now
- <module>integration-test</module>
--->
</modules>
</project>