From b1f96c318992adc4808bdcfaea53bcc738fad505 Mon Sep 17 00:00:00 2001 From: Alexey Kuznetsov Date: Thu, 2 Jul 2026 12:12:53 -0400 Subject: [PATCH] Bound MSSQL testcontainer startup and retry on transient crashes Co-Authored-By: Claude Opus 4.8 (1M context) --- .../jdbc/src/test/groovy/RemoteJDBCInstrumentationTest.groovy | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dd-java-agent/instrumentation/jdbc/src/test/groovy/RemoteJDBCInstrumentationTest.groovy b/dd-java-agent/instrumentation/jdbc/src/test/groovy/RemoteJDBCInstrumentationTest.groovy index da27c427158..966a91d68a6 100644 --- a/dd-java-agent/instrumentation/jdbc/src/test/groovy/RemoteJDBCInstrumentationTest.groovy +++ b/dd-java-agent/instrumentation/jdbc/src/test/groovy/RemoteJDBCInstrumentationTest.groovy @@ -192,6 +192,10 @@ abstract class RemoteJDBCInstrumentationTest extends VersionedNamingTestBase { sqlserver = new MSSQLServerContainer(MSSQLServerContainer.IMAGE) .acceptLicense() .withPassword(jdbcPasswords.get(SQLSERVER)) + // Bound startup and retry once to survive transient container crashes on CI. + .withStartupTimeoutSeconds(120) + .withConnectTimeoutSeconds(120) + .withStartupAttempts(2) sqlserver.start() PortUtils.waitForPortToOpen(sqlserver.getHost(), sqlserver.getMappedPort(MS_SQL_SERVER_PORT), 5, SECONDS) jdbcUrls.put(SQLSERVER, "${sqlserver.getJdbcUrl()};DatabaseName=${dbName.get(SQLSERVER)}")