Package io.quarkus.test.common
Class LauncherUtil
java.lang.Object
io.quarkus.test.common.LauncherUtil
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescription(package private) static Function<IntegrationTestStartedNotifier.Context,IntegrationTestStartedNotifier.Result> (package private) static voiddestroyProcess(Process quarkusProcess) Try to destroy the process normally a few times and resort to forceful destruction if necessary(package private) static voiddestroyProcess(ProcessHandle quarkusProcess) (package private) static voiddestroyProcess(Process process, boolean children) static org.eclipse.microprofile.config.ConfigDeprecated, for removal: This API element is subject to removal in a future version.(package private) static ProcessLaunches a process using the supplied arguments but does drain the IO(package private) static ProcessLaunches a process using the supplied arguments and makes sure the process's output is drained to standard out(package private) static voidupdateConfigForPort(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 ListeningAddresswaitForCapturedListeningData(Process quarkusProcess, Path logFile, long waitTimeSeconds) Waits (for a maximum of seconds) until the launched process indicates the address it is listening on.(package private) static IntegrationTestStartedNotifier.ResultwaitForStartedFunction(Function<IntegrationTestStartedNotifier.Context, IntegrationTestStartedNotifier.Result> startedFunction, Process quarkusProcess, long waitTimeSeconds, Path logFile) Waits for to indicate that the application has started.
-
Field Details
-
LOG_CHECK_INTERVAL
public static final int LOG_CHECK_INTERVAL- See Also:
-
-
Method Details
-
installAndGetSomeConfig
@Deprecated(forRemoval=true, since="3.17") public static org.eclipse.microprofile.config.Config installAndGetSomeConfig()Deprecated, for removal: This API element is subject to removal in a future version. -
launchProcessAndDrainIO
static Process launchProcessAndDrainIO(List<String> args, Map<String, String> env) throws IOExceptionLaunches a process using the supplied arguments and makes sure the process's output is drained to standard outImplementation detail: Avoid using ProcessBuilder's redirect here because it causes problems with Maven Failsafe as can be seen in here
- Throws:
IOException
-
launchProcess
Launches a process using the supplied arguments but does drain the IO- Throws:
IOException
-
waitForCapturedListeningData
static ListeningAddress waitForCapturedListeningData(Process quarkusProcess, Path logFile, long waitTimeSeconds) Waits (for a maximum of seconds) until the launched process indicates the address it is listening on. If the wait time is exceeded anIllegalStateExceptionis thrown. -
destroyProcess
Try to destroy the process normally a few times and resort to forceful destruction if necessary -
destroyProcess
-
destroyProcess
-
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 to indicate that the application has started.- Returns:
- the
IntegrationTestStartedNotifier.Resultindicating a successful start - Throws:
RuntimeException- if no successful start was indicated by
-
updateConfigForPort
Updates the configuration necessary to make all test systems knowledgeable about the port on which the launched process is listening
-