Class ManualRestateRunner

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.junit.jupiter.api.extension.ExtensionContext.Store.CloseableResource

    public class ManualRestateRunner
    extends java.lang.Object
    implements java.lang.AutoCloseable, org.junit.jupiter.api.extension.ExtensionContext.Store.CloseableResource
    Manual runner for Restate. We recommend using RestateRunner with JUnit 5.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Like stop().
      java.net.URL getAdminUrl()
      Get restate admin url to send HTTP requests to the admin API.
      org.testcontainers.containers.GenericContainer<?> getRestateContainer()
      Get the restate container.
      java.net.URL getRestateUrl()
      Get restate ingress url to send HTTP/gRPC requests to services.
      void run()
      Run restate, run the embedded service endpoint server, and register the services.
      void stop()
      Stop restate and the embedded service endpoint server.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • RESTATE_INGRESS_ENDPOINT_PORT

        public static final int RESTATE_INGRESS_ENDPOINT_PORT
        See Also:
        Constant Field Values
      • RESTATE_ADMIN_ENDPOINT_PORT

        public static final int RESTATE_ADMIN_ENDPOINT_PORT
        See Also:
        Constant Field Values
    • Method Detail

      • run

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

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

        public java.net.URL getAdminUrl()
        Get restate admin url to send HTTP requests to the admin API.
        Throws:
        java.lang.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 java.lang.AutoCloseable
        Specified by:
        close in interface org.junit.jupiter.api.extension.ExtensionContext.Store.CloseableResource