From cc8b86b4af6151fb9f3c8a2f8e22ddffa482e6f2 Mon Sep 17 00:00:00 2001 From: Robert Stupp Date: Fri, 14 Apr 2023 13:47:39 +0200 Subject: [PATCH] Increase dev-mode timeout on Windows to 90 seconds --- .../gradle/devmode/QuarkusDevGradleTestBase.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/integration-tests/gradle/src/test/java/io/quarkus/gradle/devmode/QuarkusDevGradleTestBase.java b/integration-tests/gradle/src/test/java/io/quarkus/gradle/devmode/QuarkusDevGradleTestBase.java index 3746d3ecef984..d773b91b08f81 100644 --- a/integration-tests/gradle/src/test/java/io/quarkus/gradle/devmode/QuarkusDevGradleTestBase.java +++ b/integration-tests/gradle/src/test/java/io/quarkus/gradle/devmode/QuarkusDevGradleTestBase.java @@ -7,6 +7,7 @@ import java.io.File; import java.io.IOException; import java.nio.file.Files; +import java.util.Locale; import java.util.Map; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; @@ -122,7 +123,7 @@ protected String getHttpResponse() { } protected String getHttpResponse(String path) { - return getHttpResponse(path, 1, TimeUnit.MINUTES); + return getHttpResponse(path, devModeTimeoutSeconds(), TimeUnit.SECONDS); } protected String getHttpResponse(String path, long timeout, TimeUnit tu) { @@ -146,7 +147,16 @@ protected void replace(String srcFile, Map tokens) { } protected void assertUpdatedResponseContains(String path, String value) { - assertUpdatedResponseContains(path, value, 1, TimeUnit.MINUTES); + assertUpdatedResponseContains(path, value, devModeTimeoutSeconds(), TimeUnit.SECONDS); + } + + protected int devModeTimeoutSeconds() { + // It's a wild guess, but maybe Windows is just slower - at least: a successful Gradle-CI-jobs on Windows is + // 2.5x slower than the same Gradle-CI-job on Linux. + if (System.getProperty("os.name").toLowerCase(Locale.ENGLISH).contains("windows")) { + return 90; + } + return 60; } protected void assertUpdatedResponseContains(String path, String value, long waitAtMost, TimeUnit timeUnit) {