RestateRunner
Deprecated
Restate runner for JUnit 5. Example:
@RegisterExtension
Content copied to clipboard
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 server:
@Test
Content copied to clipboard
void initialCountIsZero(@RestateClient
Content copied to clipboard Client client) {
var client = CounterClient.fromClient(ingressClient, "my-counter");
// Use client as usual
long response = client.get();
assertThat(response).isEqualTo(0L);
}
Content copied to clipboard
Deprecated
We now recommend using RestateTest.
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