forked from clusterbench/clusterbench
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move WildFly integration tests from ear module to integration-tests m…
…odule and introduce Arquillian and JUnit 5 (resolves clusterbench#470)
- Loading branch information
Showing
9 changed files
with
247 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- | ||
~ Copyright The ClusterBench Authors | ||
~ SPDX-License-Identifier: Apache-2.0 | ||
--> | ||
|
||
<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/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.jboss.test</groupId> | ||
<artifactId>clusterbench-it-parent</artifactId> | ||
<version>10.0.0.Final-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>clusterbench-it-wildfly</artifactId> | ||
<packaging>jar</packaging> | ||
|
||
<properties> | ||
<jboss.home>${project.build.directory}/wildfly</jboss.home> | ||
</properties> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.junit</groupId> | ||
<artifactId>junit-bom</artifactId> | ||
<version>${version.org.junit.jupiter}</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.arquillian</groupId> | ||
<artifactId>arquillian-bom</artifactId> | ||
<version>${version.org.jboss.arquillian}</version> | ||
<scope>import</scope> | ||
<type>pom</type> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.arquillian.junit5</groupId> | ||
<artifactId>arquillian-junit5-core</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.arquillian.junit5</groupId> | ||
<artifactId>arquillian-junit5-container</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.httpcomponents</groupId> | ||
<artifactId>httpclient</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.wildfly.arquillian</groupId> | ||
<artifactId>wildfly-arquillian-container-managed</artifactId> | ||
<version>5.1.0.Beta2</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>copy-war</id> | ||
<phase>generate-test-resources</phase> | ||
<goals> | ||
<goal>copy</goal> | ||
</goals> | ||
<configuration> | ||
<artifactItems> | ||
<artifactItem> | ||
<groupId>org.jboss.test</groupId> | ||
<artifactId>clusterbench-ee10-ear</artifactId> | ||
<version>${project.version}</version> | ||
<type>ear</type> | ||
<overWrite>true</overWrite> | ||
<outputDirectory>${project.build.directory}</outputDirectory> | ||
</artifactItem> | ||
</artifactItems> | ||
<stripVersion>true</stripVersion> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-failsafe-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>smoke-test</id> | ||
<phase>integration-test</phase> | ||
<goals> | ||
<goal>integration-test</goal> | ||
<goal>verify</goal> | ||
</goals> | ||
<configuration> | ||
<systemProperties> | ||
<jboss.home>${jboss.home}</jboss.home> | ||
</systemProperties> | ||
<trimStackTrace>false</trimStackTrace> | ||
<classpathDependencyExcludes> | ||
<exclude>org.jboss.arquillian.junit:arquillian-junit-container</exclude> | ||
<exclude>org.jboss.arquillian.junit:arquillian-junit-core</exclude> | ||
</classpathDependencyExcludes> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.wildfly.plugins</groupId> | ||
<artifactId>wildfly-maven-plugin</artifactId> | ||
<version>${version.org.wildfly.maven.plugin}</version> | ||
<configuration> | ||
<provisioning-dir>${jboss.home}</provisioning-dir> | ||
<jboss-home>${jboss.home}</jboss-home> | ||
<feature-packs> | ||
<feature-pack> | ||
<groupId>org.wildfly</groupId> | ||
<artifactId>wildfly-ee-galleon-pack</artifactId> | ||
<version>${version.org.wildfly}</version> | ||
</feature-pack> | ||
</feature-packs> | ||
<galleon-options> | ||
<jboss-fork-embedded>true</jboss-fork-embedded> | ||
</galleon-options> | ||
<layers> | ||
<layer>cloud-server</layer> | ||
<layer>jsf</layer> | ||
<layer>ejb</layer> | ||
<layer>web-clustering</layer> | ||
</layers> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>provision-server-for-testing</id> | ||
<goals> | ||
<goal>provision</goal> | ||
</goals> | ||
<phase>process-test-classes</phase> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
33 changes: 33 additions & 0 deletions
33
...tests/wildfly/src/test/java/org/jboss/test/clusterbench/it/wildfly/AbstractWildFlyIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright The ClusterBench Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.jboss.test.clusterbench.it.wildfly; | ||
|
||
import java.io.File; | ||
|
||
import org.jboss.arquillian.container.test.api.Deployment; | ||
import org.jboss.shrinkwrap.api.Archive; | ||
import org.jboss.shrinkwrap.api.ShrinkWrap; | ||
import org.jboss.shrinkwrap.api.importer.ZipImporter; | ||
import org.jboss.shrinkwrap.api.spec.EnterpriseArchive; | ||
|
||
/** | ||
* Imports previously built enterprise archive (ear) for automatic deployment and allowing resource injection. | ||
* | ||
* TODO: move this to a suite scope, so it's only done once per execution. | ||
* | ||
* @author Radoslav Husar | ||
*/ | ||
public abstract class AbstractWildFlyIT { | ||
|
||
@Deployment(testable = false) | ||
public static Archive<?> deployment() { | ||
return ShrinkWrap | ||
.create(ZipImporter.class, "clusterbench.ear") | ||
.importFrom(new File("target/clusterbench-ee10-ear.ear")) | ||
.as(EnterpriseArchive.class); | ||
} | ||
|
||
} |
Oops, something went wrong.