Skip to content

Commit

Permalink
Moved all test base classes to src/test/java
Browse files Browse the repository at this point in the history
- This makes sure applications can compile in strict
mode without inheriting the JUnit GWT module

- To use our test base classes for application tests
the corresponding test-jar has to be included i.e.
<dependency>
  <groupId>org.jboss.errai</groupId>
  <artifactId>errai-cdi-client</artifactId>
  <type>test-jar</type>
  <scope>test</scope>
</dependency>
  • Loading branch information
csadilek committed Oct 29, 2014
1 parent 7cb39e9 commit 37bd041
Show file tree
Hide file tree
Showing 29 changed files with 304 additions and 39 deletions.
5 changes: 3 additions & 2 deletions RELEASE-PROCESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Release Steps

1. Run the test suite. Ensure all tests pass.

% mvn -Pintegration-test test
% mvn -Pintegration-test clean test

1. Update reference guide with latest content and check in generated docbook.

Expand All @@ -45,7 +45,8 @@ Release Steps
1. Build and package the release. These are the bits that will be uploaded to nexus.
Expect this to take about 4 minutes, depending on network speed.

% mvn clean deploy -Dgwt.compiler.skip=true -Dmaven.test.skip=true -DaltDeploymentRepository=jboss-snapshots-repository::default::https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/
% mvn clean install -Dgwt.compiler.skip=true
% mvn deploy -Dgwt.compiler.skip=true -Dmaven.test.skip=true -DaltDeploymentRepository=jboss-snapshots-repository::default::https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/

1. Create the a-la-carte binary Errai distribution and docs

Expand Down
28 changes: 28 additions & 0 deletions errai-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,25 @@
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-bus</artifactId>
<type>test-jar</type>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-cdi-client</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-cdi-client</artifactId>
<type>test-jar</type>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
Expand Down Expand Up @@ -208,6 +222,13 @@
<artifactId>errai-ioc</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-ioc</artifactId>
<type>test-jar</type>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
Expand Down Expand Up @@ -239,6 +260,13 @@
<artifactId>errai-jaxrs-client</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-jaxrs-client</artifactId>
<type>test-jar</type>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
Expand Down
18 changes: 18 additions & 0 deletions errai-bus/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,24 @@
<directory>src/test/resources</directory>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
<configuration>
<includes>
<include>**/AbstractErraiTest.*</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
Expand Down
7 changes: 7 additions & 0 deletions errai-cdi-async-databinding-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,13 @@
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-cdi-client</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-tools</artifactId>
Expand Down
7 changes: 7 additions & 0 deletions errai-cdi-async-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,13 @@
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-cdi-client</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-tools</artifactId>
Expand Down
18 changes: 18 additions & 0 deletions errai-cdi/errai-cdi-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,24 @@
<directory>src/test/resources</directory>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
<configuration>
<includes>
<include>**/AbstractErraiCDITest.*</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
Expand Down
87 changes: 60 additions & 27 deletions errai-cdi/weld-integration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<!-- Errai Core -->
<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-common</artifactId>
<artifactId>errai-common</artifactId>
</dependency>

<dependency>
Expand All @@ -59,7 +59,14 @@

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-config</artifactId>
<artifactId>errai-bus</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-config</artifactId>
</dependency>

<dependency>
Expand All @@ -70,7 +77,14 @@

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-ioc-bus-support</artifactId>
<artifactId>errai-ioc</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-ioc-bus-support</artifactId>
<scope>provided</scope>
</dependency>

Expand All @@ -82,10 +96,17 @@

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-cdi-client</artifactId>
<artifactId>errai-cdi-client</artifactId>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-cdi-client</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand Down Expand Up @@ -151,13 +172,13 @@

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-javax-enterprise</artifactId>
<artifactId>errai-javax-enterprise</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-data-binding</artifactId>
<artifactId>errai-data-binding</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down Expand Up @@ -188,7 +209,7 @@
<profile.testOutputDirectory>war/WEB-INF/classes</profile.testOutputDirectory>
</properties>

<build>
<build>
<testResources>
<testResource>
<directory>src/test/java</directory>
Expand Down Expand Up @@ -226,21 +247,7 @@
</plugins>
</build>

<dependencies>
<dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.interceptor</groupId>
<artifactId>jboss-interceptors-api_1.2_spec</artifactId>
</dependency>

<dependency>
<groupId>org.jboss.spec.javax.servlet</groupId>
<artifactId>jboss-servlet-api_3.0_spec</artifactId>
<scope>provided</scope>
</dependency>
<dependencies>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
Expand All @@ -255,8 +262,20 @@
<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-common</artifactId>
</dependency>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-bus</artifactId>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-bus</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-ioc</artifactId>
Expand All @@ -269,19 +288,33 @@
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
</exclusion>
</exclusions>
</exclusions>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-ioc</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-cdi-client</artifactId>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-cdi-client</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-ioc-bus-support</artifactId>
</dependency>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
Expand Down Expand Up @@ -320,7 +353,7 @@
</dependency>
<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet-core</artifactId>
<artifactId>weld-servlet</artifactId>
</dependency>

<!-- GWT and GWT Extensions -->
Expand Down Expand Up @@ -375,7 +408,7 @@
<groupId>org.jboss.errai</groupId>
<artifactId>errai-data-binding</artifactId>
<scope>provided</scope>
</dependency>
</dependency>
</dependencies>
</profile>
</profiles>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.jboss.errai.cdi.producer.client.test;


import static org.junit.Assert.*;
import java.util.List;

import org.jboss.errai.cdi.producer.client.BeanConstrConsumersMultiProducers;
import org.jboss.errai.cdi.producer.client.BeanConstrConsumesOwnProducer;
Expand All @@ -25,9 +25,6 @@
import org.jboss.errai.ioc.client.container.IOC;
import org.jboss.errai.ioc.client.container.IOCBeanDef;
import org.jboss.errai.ioc.client.container.SyncBeanManager;
import org.junit.Test;

import java.util.List;

/**
* Tests CDI producers.
Expand Down
7 changes: 7 additions & 0 deletions errai-data-binding/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-ioc</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-marshalling</artifactId>
Expand Down
7 changes: 7 additions & 0 deletions errai-demos/errai-bus-demo-stress-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@
</exclusions>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-bus</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-ioc</artifactId>
Expand Down
7 changes: 7 additions & 0 deletions errai-html5/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@
<artifactId>errai-cdi-client</artifactId>
</dependency>

<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-cdi-client</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand Down
Loading

0 comments on commit 37bd041

Please sign in to comment.