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 Restate. We recommend using RestateRunner with JUnit 5.
  • Field Details

    • RESTATE_INGRESS_ENDPOINT_PORT

      public static final int RESTATE_INGRESS_ENDPOINT_PORT
      See Also:
    • RESTATE_ADMIN_ENDPOINT_PORT

      public static final int RESTATE_ADMIN_ENDPOINT_PORT
      See Also:
  • Method Details

    • run

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

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

      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

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

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

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