From 320cc0e185ddfe9993922cc67fc2a3d855d9d438 Mon Sep 17 00:00:00 2001 From: Thibault Vallin Date: Fri, 23 Sep 2022 00:15:41 +0200 Subject: [PATCH] Fix intermittent failure - archetype build (FT timeout) (#4690) (#4934) * Update timeout --- .../files/src/main/java/__pkg__/FtService.java.mustache | 2 +- .../files/src/test/java/__pkg__/FtServiceTest.java.mustache | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/archetypes/helidon/src/main/archetype/se/custom/files/src/main/java/__pkg__/FtService.java.mustache b/archetypes/helidon/src/main/archetype/se/custom/files/src/main/java/__pkg__/FtService.java.mustache index f2baf666d2e..204f69abd4f 100644 --- a/archetypes/helidon/src/main/archetype/se/custom/files/src/main/java/__pkg__/FtService.java.mustache +++ b/archetypes/helidon/src/main/archetype/se/custom/files/src/main/java/__pkg__/FtService.java.mustache @@ -44,7 +44,7 @@ public class FtService implements Service { this.retry = Retry.builder() .retryPolicy(Retry.DelayingRetryPolicy.noDelay(3)) .build(); - this.timeout = Timeout.create(Duration.ofMillis(100)); + this.timeout = Timeout.create(Duration.ofSeconds(5)); } @Override diff --git a/archetypes/helidon/src/main/archetype/se/custom/files/src/test/java/__pkg__/FtServiceTest.java.mustache b/archetypes/helidon/src/main/archetype/se/custom/files/src/test/java/__pkg__/FtServiceTest.java.mustache index a3693cd52eb..0e557ff703b 100644 --- a/archetypes/helidon/src/main/archetype/se/custom/files/src/test/java/__pkg__/FtServiceTest.java.mustache +++ b/archetypes/helidon/src/main/archetype/se/custom/files/src/test/java/__pkg__/FtServiceTest.java.mustache @@ -1,5 +1,6 @@ package {{package}}; +import java.time.Duration; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; @@ -172,9 +173,9 @@ class FtServiceTest { assertThat(response, is("Slept for 50 ms")); WebClientResponse clientResponse = client.get() - .path("/timeout/105") + .path("/timeout/10000") .request() - .await(1, TimeUnit.SECONDS); + .await(Duration.ofSeconds(11)); response = clientResponse.content().as(String.class).await(1, TimeUnit.SECONDS); // error handler specified in Main