From e1bb4f23d14c084421d6928898a507a84ca69108 Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Tue, 14 Sep 2021 10:00:53 +0300 Subject: [PATCH] Take configured wait time into account in @QuarkusIntegrationTest for log file check Relates to: https://github.com/quarkusio/quarkus/issues/17767#issuecomment-918269140 --- .../src/main/java/io/quarkus/test/common/LauncherUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 {