RestateRunner
Restate runner for JUnit 5. Example:
{@}RegisterExtension
private final static RestateRunner restateRunner = RestateRunnerBuilder.create()
.withService(new MyService())
.buildRunner();
Content copied to clipboard
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
}
Content copied to clipboard
Functions
Link copied to clipboard
open fun resolveParameter(parameterContext: ParameterContext, extensionContext: ExtensionContext): Any
Link copied to clipboard
open fun supportsParameter(parameterContext: ParameterContext, extensionContext: ExtensionContext): Boolean