diff --git a/test-framework/common/src/main/java/io/quarkus/test/common/LauncherUtil.java b/test-framework/common/src/main/java/io/quarkus/test/common/LauncherUtil.java index c8429bf3a83c3..fe3b846263cc6 100644 --- a/test-framework/common/src/main/java/io/quarkus/test/common/LauncherUtil.java +++ b/test-framework/common/src/main/java/io/quarkus/test/common/LauncherUtil.java @@ -250,8 +250,8 @@ public void run() { } private boolean ensureProcessOutputFileExists() { - int i = 0; - while (i++ < 50) { + long bailoutTime = System.currentTimeMillis() + waitTime.toMillis(); + while (System.currentTimeMillis() < bailoutTime) { if (Files.exists(processOutput)) { return true; } else {