RestateRunner

open class RestateRunner : BaseRestateRunner, BeforeAllCallback

Restate runner for JUnit 5. Example:


{@}RegisterExtension
private final static RestateRunner restateRunner = RestateRunnerBuilder.create()
        .withService(new MyService())
        .buildRunner();

The runner will deploy the services locally, execute Restate as container using testcontainers, and register the services.

This extension is scoped per test class, meaning that the restate runner will be shared among test methods.

Use the annotations RestateClient, RestateURL and RestateAdminClient to interact with the deployed runtime:


{@}Test
void testGreet({@}RestateGrpcChannel ManagedChannel channel) {
    CounterGrpc.CounterBlockingStub client = CounterGrpc.newBlockingStub(channel);
    // Use client
}

Functions

Link copied to clipboard
open fun beforeAll(context: ExtensionContext)
Link copied to clipboard
open fun resolveParameter(parameterContext: ParameterContext, extensionContext: ExtensionContext): Any
abstract fun resolveParameter(p: ParameterContext, p1: ExtensionContext): Any
Link copied to clipboard
open fun supportsParameter(parameterContext: ParameterContext, extensionContext: ExtensionContext): Boolean
abstract fun supportsParameter(p: ParameterContext, p1: ExtensionContext): Boolean