ci: abort hung tests with a thread dump and time out a stuck surefire fork (#4940)

* ci: abort hung tests with a thread dump and time out a stuck surefire fork

A hung test ran until the 20-minute job limit killed the shard, leaving no surefire report that named it.

Give every test and lifecycle method a 2-minute JUnit default with a thread dump, set through surefire configurationParameters so quarkus-junit's own junit-platform.properties (its profile-aware class orderer) is not shadowed. In CI, -Dsurefire.timeout=900 kills a fork whose test ignores the interrupt (deadlock, blocking I/O) before the job limit; shards' test steps take 10-11 minutes. SageMakerDockerIntegrationTest waits up to 150 s for real containers, so it gets a 3-minute timeout.

* test: give two Docker-backed tests a timeout that covers their own waits

EksRegistryHostsDockerIntegrationTest (three 60 s cluster-ready waits plus 105 s of polling) and TimestreamInfluxDbDockerIntegrationTest (three 180 s status waits) can legitimately run past the new 2-minute default.

* ci: size the fork timeout to the slowest shard and cover the remaining long tests

surefire.timeout caps a whole shard, and shard 2 already spends 903 s running tests, so 900 s would kill a passing run. Raise it to 1200 s and the job limit to 25 minutes so surefire still reports first. Give the Timestream test headroom beyond its 540 s of status waits, and the opt-in GPU SageMaker test a timeout covering its 300 s poll.
This commit is contained in:
Niels Kootstra authored and GitHub committed 2026-10-10 09:22:05 -05:00
1 parent 8b83892dff
commit 546d7e894e
6 files changed
+32 -4

No files matched your search

@@ -23,6 +23,7 @@ import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import java.io.ByteArrayOutputStream;
import java.nio.ByteBuffer;
@@ -53,6 +54,8 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
*/
@QuarkusTest
@TestProfile(EksRegistryHostsDockerIntegrationTest.Profile.class)
// Three 60 s cluster-ready waits plus 30 s, 30 s and 45 s polls: past the suite's 2-minute default.
@Timeout(value = 6, unit = TimeUnit.MINUTES)
class EksRegistryHostsDockerIntegrationTest {
private static final Logger LOG = Logger.getLogger(EksRegistryHostsDockerIntegrationTest.class);
@@ -13,6 +13,7 @@ import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
@@ -32,6 +33,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
@QuarkusTest
// Real containers may take up to awaitTerminalStatus's 150 s, past the suite's 2-minute default.
@Timeout(value = 3, unit = TimeUnit.MINUTES)
class SageMakerDockerIntegrationTest {
private static final String AUTH =
"AWS4-HMAC-SHA256 Credential=test/20260205/us-east-1/sagemaker/aws4_request";
@@ -13,10 +13,12 @@ import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import java.time.Duration;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import static io.restassured.RestAssured.given;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -52,6 +54,8 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
* {@code mode} defaults to {@code cdi}.
*/
@QuarkusTest
// The training job may poll for up to 300 s plus the image pull, past the suite's 2-minute default.
@Timeout(value = 10, unit = TimeUnit.MINUTES)
@TestProfile(SageMakerGpuDockerIntegrationTest.GpuHardwareProfile.class)
class SageMakerGpuDockerIntegrationTest {
@@ -11,6 +11,7 @@ import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import java.net.URI;
import java.net.http.HttpClient;
@@ -20,6 +21,7 @@ import java.nio.charset.StandardCharsets;
import java.time.Duration;
import java.util.Base64;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import static io.restassured.RestAssured.given;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -29,6 +31,8 @@ import static org.junit.jupiter.api.Assertions.fail;
@Tag("docker")
@QuarkusTest
@TestProfile(TimestreamInfluxDbDockerIntegrationTest.RealContainerProfile.class)
// Three 180 s status waits on real containers, plus the requests and cleanup around them.
@Timeout(value = 15, unit = TimeUnit.MINUTES)
class TimestreamInfluxDbDockerIntegrationTest {
private static final String CONTENT_TYPE = "application/x-amz-json-1.0";