Package io.quarkus.test.common
Class LauncherUtil
- java.lang.Object
-
- io.quarkus.test.common.LauncherUtil
-
public final class LauncherUtil extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
LOG_CHECK_INTERVAL
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static Function<IntegrationTestStartedNotifier.Context,IntegrationTestStartedNotifier.Result>
createStartedFunction()
static org.eclipse.microprofile.config.Config
installAndGetSomeConfig()
(package private) static Process
launchProcess(List<String> args)
Launches a process using the supplied arguments and makes sure the process's output is drained to standard out(package private) 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(package private) 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.(package private) static IntegrationTestStartedNotifier.Result
waitForStartedFunction(Function<IntegrationTestStartedNotifier.Context,IntegrationTestStartedNotifier.Result> startedFunction, Process quarkusProcess, long waitTimeSeconds, Path logFile)
Waits for {@param startedFunction} to indicate that the application has started.
-
-
-
Field Detail
-
LOG_CHECK_INTERVAL
public static final int LOG_CHECK_INTERVAL
- See Also:
- Constant Field Values
-
-
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- 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 anIllegalStateException
is thrown.
-
createStartedFunction
static Function<IntegrationTestStartedNotifier.Context,IntegrationTestStartedNotifier.Result> createStartedFunction()
-
waitForStartedFunction
static IntegrationTestStartedNotifier.Result waitForStartedFunction(Function<IntegrationTestStartedNotifier.Context,IntegrationTestStartedNotifier.Result> startedFunction, Process quarkusProcess, long waitTimeSeconds, Path logFile)
Waits for {@param startedFunction} to indicate that the application has started.- Returns:
- the
IntegrationTestStartedNotifier.Result
indicating a successful start - Throws:
RuntimeException
- if no successful start was indicated by {@param startedFunction}
-
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
-
-