sdk-java/temporal-test-server at main · temporalio/sdk-java · GitHub
Skip to content

Latest commit

 

History

History

temporal-test-server

Folders and files

README.md

Temporal Test Workflow Server

This module includes an in-memory Temporal testing service implementation. It is not intended to be used directly but rather by programming against the TestWorkflowEnvironment interface in the temporal-testing module.

In addition to being consumed as a library by JVM-based languages, this module can be built into a standalone executable and run as an independent process.

Usage

Do not depend on this module directly, see the instructions in temporal-testing.

In-memory Temporal testing service

This service allows to run a test-only in-memory implementation of Temporal server API.

To build a test server using GraalVM native-image

From the root of the java-sdk repo:

./gradlew -PnativeBuild :temporal-test-server:nativeCompile

This will give you a native executable build/graal/temporal-test-server. The executable requires a single argument: the port number on which it should listen.

To run the test server as a native-image through Gradle

From the root of the java-sdk repo:

 ./gradlew -PnativeBuild :temporal-test-server:nativeRun    

GraalVM native-image configuration

The GraalVM native-image compiler uses the native-image.properties file and the referenced JSON files during compilation. The JSON files are generated by running the test server java code in a JVM configured with the GraalVM tracing agent configured,

To run the test server test with tracing agent through Gradle

./gradlew -Pagent -PnativeBuild :temporal-test-server:test

Copy metadata from test run

./gradlew -PnativeBuild  :temporal-test-server:metadataCopy --task test