Skip to content

Commit 0605f4b

Browse files
committed
💚 Move Timeout to WireMockAemProxyEndpoint class
Still struggling to understand why this test hangs intermittently on the CI build (and local builds, but more infrequently on local builds). The timeout should just make it fail faster when it hangs.
1 parent 52bfbe0 commit 0605f4b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎spring/fluentforms-sample-web-jersey-app/src/test/java/com/_4point/aem/fluentforms/sampleapp/resources/AbstractAemProxyEndpointTest.java‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@
1010

1111
import java.net.URI;
1212
import java.nio.file.Path;
13-
import java.util.concurrent.TimeUnit;
1413

1514
import org.htmlunit.WebClient;
1615
import org.htmlunit.html.HtmlPage;
1716
import org.junit.jupiter.api.Test;
18-
import org.junit.jupiter.api.Timeout;
1917
import org.springframework.boot.test.web.server.LocalServerPort;
2018

2119
import jakarta.ws.rs.client.ClientBuilder;
@@ -34,7 +32,6 @@ protected AbstractAemProxyEndpointTest(String sampleFileLocation) {
3432
this.sampleFileLocation = sampleFileLocation;
3533
}
3634

37-
@Timeout(value = 30, unit = TimeUnit.SECONDS)
3835
@Test
3936
void testProxyCsrfToken() throws Exception {
4037
String csrf_token_path = "/aem/libs/granite/csrf/token.json";

‎spring/fluentforms-sample-web-jersey-app/src/test/java/com/_4point/aem/fluentforms/sampleapp/resources/WireMockAemProxyEndpointTest.java‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import java.nio.file.Path;
77
import java.util.List;
8+
import java.util.concurrent.TimeUnit;
89

910
import org.htmlunit.DefaultCredentialsProvider;
1011
import org.htmlunit.WebClient;
@@ -13,6 +14,7 @@
1314
import org.junit.jupiter.api.BeforeEach;
1415
import org.junit.jupiter.api.Disabled;
1516
import org.junit.jupiter.api.Test;
17+
import org.junit.jupiter.api.Timeout;
1618
import org.junit.jupiter.api.condition.EnabledIf;
1719
import org.springframework.boot.test.context.SpringBootTest;
1820
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
@@ -36,6 +38,7 @@
3638
portProperties = "fluentforms.aem.port"
3739
)
3840
)
41+
@Timeout(value = 30, unit = TimeUnit.SECONDS)
3942
class WireMockAemProxyEndpointTest extends AbstractAemProxyEndpointTest {
4043
private static final boolean WIREMOCK_RECORDING = false;
4144

0 commit comments

Comments
 (0)