Payara Micro Arquillian Container
The Payara Micro Arquillian container provides a managed Payara Micro instance for integration testing.
Steps for Building
In 5.194, the Payara Micro Arquillian container is in beta, and as such required building from the Payara Git project. The steps for doing so are as follows:
Clone the Payara Git repository:
git clone https://github.com/payara/Payara.git
Build and install:
cd Payara/ mvn clean install -DskipTests -f appserver/extras/arquillian-containers/pom.xml
The Arquillian container can then be found in your local Maven repository, and can be included in your project using the following Maven coordinates:
<dependency>
<groupId>fish.payara.arquillian</groupId>
<artifactId>arquillian-payara-micro-5-managed</artifactId>
<version>${version}</version>
</dependency>
Configuring the Container
The following configuration options are available, each of which can be provided through the specified system properties or environment variables:
Option | Description | System Property | Environment Variable | Default |
---|---|---|---|---|
|
Provides the location of the Payara Micro Jar. |
|
|
|
|
Specifies the amount of time in seconds that the container will wait for Payara Micro to start. |
|
|
|
|
Randomises the initial HTTP port of Payara Micro. This saves time by avoiding collisions with the default port. |
|
|
|
|
Enables the |
|
|
|
|
Enables clustering on the Micro instance. |
|
|
|
|
Enables/disables console output on the Micro instance. |
|
|
|
|
Enables debugging on the Micro instance. By default Payara Micro will
wait for the debugger on port |
|
|
|
|
Provides additional options to the Java process running the Micro instance (I.e. between |
|
|
|
|
Provides additional options to the Micro instance (I.e. at the end of the command.). |
|
|
|
These options can all be provided through either an environment variable or system property. The easiest way to provide these to the test instance is through the surefire plugin.
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemProperties>
<payara.microJar>/path/to/micro.jar</payara.microJar>
</systemProperties>
</configuration>
</plugin>