Class LauncherUtil


  • public final class LauncherUtil
    extends Object
    • Method Detail

      • installAndGetSomeConfig

        public static org.eclipse.microprofile.config.Config installAndGetSomeConfig()
      • launchProcess

        static Process launchProcess​(List<String> args)
                              throws IOException
        Launches a process using the supplied arguments and makes sure the process's output is drained to standard out

        Implementation detail: Avoid using ProcessBuilder's redirect here because it causes problems with Maven Failsafe as can be seen in here

        Throws:
        IOException
      • waitForCapturedListeningData

        static ListeningAddress waitForCapturedListeningData​(Process quarkusProcess,
                                                             Path logFile,
                                                             long waitTimeSeconds)
        Waits (for a maximum of {@param waitTimeSeconds} seconds) until the launched process indicates the address it is listening on. If the wait time is exceeded an IllegalStateException is thrown.
      • destroyProcess

        static void destroyProcess​(Process quarkusProcess)
        Try to destroy the process normally a few times and resort to forceful destruction if necessary
      • updateConfigForPort

        static void updateConfigForPort​(Integer effectivePort)
        Updates the configuration necessary to make all test systems knowledgeable about the port on which the launched process is listening