Class ManualRestateRunner

java.lang.Object
dev.restate.sdk.testing.ManualRestateRunner
All Implemented Interfaces:
AutoCloseable, org.junit.jupiter.api.extension.ExtensionContext.Store.CloseableResource

public class ManualRestateRunner extends Object implements AutoCloseable, org.junit.jupiter.api.extension.ExtensionContext.Store.CloseableResource
Manual runner for the Restate test infra, starting the Restate server container together with the provided services and automatically registering them. To start the infra use run() and to stop it use stop().

Use RestateRunnerBuilder.buildManualRunner() to build an instance of this class.

If you use JUnit 5, we suggest using RestateRunner instead.

  • Field Details Link icon

    • RESTATE_INGRESS_ENDPOINT_PORT Link icon

      public static final int RESTATE_INGRESS_ENDPOINT_PORT
      See Also:
    • RESTATE_ADMIN_ENDPOINT_PORT Link icon

      public static final int RESTATE_ADMIN_ENDPOINT_PORT
      See Also:
  • Method Details Link icon

    • run Link icon

      @Deprecated(forRemoval=true) public void run()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use start() instead.
    • start Link icon

      public void start()
      Run restate, run the embedded service endpoint server, and register the services.
    • getRestateUrl Link icon

      public URL getRestateUrl()
      Get restate ingress url to send HTTP/gRPC requests to services.
      Throws:
      IllegalStateException - if the restate container is not running.
    • getAdminUrl Link icon

      public URL getAdminUrl()
      Get restate admin url to send HTTP requests to the admin API.
      Throws:
      IllegalStateException - if the restate container is not running.
    • getRestateContainer Link icon

      public org.testcontainers.containers.GenericContainer<?> getRestateContainer()
      Get the restate container.
    • stop Link icon

      public void stop()
      Stop restate and the embedded service endpoint server.
    • close Link icon

      public void close()
      Like stop().
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface org.junit.jupiter.api.extension.ExtensionContext.Store.CloseableResource