RestateRunner

open class RestateRunner : BeforeAllCallback, ParameterResolver

Deprecated

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 server:

@Test
void initialCountIsZero(
@RestateClient
Client client) { var client = CounterClient.fromClient(ingressClient, "my-counter"); // Use client as usual long response = client.get(); assertThat(response).isEqualTo(0L); }

Deprecated

We now recommend using RestateTest.

Functions

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