Payara Micro Managed Arquillian Container

The Payara Micro Managed Arquillian container provides a managed Payara Micro instance for integration testing.

Usage

The Payara Micro Managed Arquillian container can be found on Maven Central, and can be included in your project using the following Maven coordinates:

<dependency>
  <groupId>fish.payara.arquillian</groupId>
  <artifactId>arquillian-payara-micro-managed</artifactId>
  <version>${version}</version>
</dependency>

You can find the latest artifact version from here.

Configuring the Container

The following configuration options are available, each of which can be provided through the specified system properties or environment variables:

Table 1. Configuration Options
Option Description System Property Environment Variable Default

microJar

Provides the location of the Payara Micro Community Jar.

payara.microJar

MICRO_JAR

null

startupTimeoutInSeconds

Specifies the amount of time in seconds that the container will wait for Payara Micro Community to start.

payara.startupTimeoutInSeconds

MICRO_STARTUP_TIMEOUT_IN_SECONDS

180

randomHttpPort

Randomises the initial HTTP port of Payara Micro Community. This saves time by avoiding collisions with the default port.

payara.randomHttpPort

MICRO_RANDOM_HTTP_PORT

true

autoBindHttp

Enables the --autoBindHttp option for the Micro instance.

payara.autoBindHttp

MICRO_AUTOBIND_HTTP

true

clusterEnabled

Enables clustering on the Micro instance.

payara.clusterEnabled

MICRO_CLUSTER_ENABLED

false

consoleOutput

Enables/disables console output on the Micro instance.

payara.consoleOutput

MICRO_CONSOLE_OUTPUT

true

debug

Enables debugging on the Micro instance. By default Payara Micro Community will wait for the debugger on port 5005 before starting. Disables the startup timeout. To change this, provide java debug options to cmdOptions.

payara.debug

MICRO_DEBUG

false

cmdOptions

Provides additional options to the Java process running the Micro instance (I.e. between java and -jar.).

payara.cmdOptions

MICRO_CMD_OPTIONS

null

extraMicroOptions

Provides additional options to the Micro instance (I.e. at the end of the command.).

payara.extraMicroOptions

EXTRA_MICRO_OPTIONS

null

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.

Example
<plugin>
    <artifactId>maven-surefire-plugin</artifactId>
    <configuration>
        <systemProperties>
            <payara.microJar>/path/to/micro.jar</payara.microJar>
        </systemProperties>
    </configuration>
</plugin>