Class BaseService<T extends Service>

    • Field Detail

      • SERVICE_STARTUP_TIMEOUT_DEFAULT

        public static final Duration SERVICE_STARTUP_TIMEOUT_DEFAULT
    • Constructor Detail

      • BaseService

        public BaseService()
    • Method Detail

      • onPreStart

        public T onPreStart​(Action action)
      • onPostStart

        public T onPostStart​(Action action)
      • withProperties

        public T withProperties​(String... propertiesFiles)
        The runtime configuration property to be used if the built artifact is configured to be run.
      • withProperty

        public T withProperty​(String key,
                              String value)
        The runtime configuration property to be used if the built artifact is configured to be run.
        Specified by:
        withProperty in interface Service
      • withProperty

        public T withProperty​(String key,
                              Supplier<String> value)
        The runtime configuration property to be used if the built artifact is configured to be run.
      • isRunning

        public boolean isRunning()
        Specified by:
        isRunning in interface Service
      • getHost

        public String getHost()
      • getPort

        public Integer getPort()
      • start

        public void start()
        Start the managed resource. If the managed resource is running, it does nothing.
        Specified by:
        start in interface Service
        Throws:
        RuntimeException - when application errors at startup.
      • stop

        public void stop()
        Stop the Quarkus application.
        Specified by:
        stop in interface Service
      • register

        public ServiceContext register​(String serviceName,
                                       org.junit.jupiter.api.extension.ExtensionContext testContext)
        Specified by:
        register in interface Service
      • restart

        public void restart()
      • getServiceFolder

        protected Path getServiceFolder()
      • getPropertyFromContext

        protected <U> U getPropertyFromContext​(String key)