Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Comment on lines +196 to +197

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep MSSQL's 240-second startup window

On slow or cold CI runners where SQL Server needs more than 120s but less than the previous MSSQLServerContainer 240s default to accept JDBC connections, this now fails both attempts: withStartupAttempts(2) restarts from a fresh container after the first timeout, so the second attempt loses all progress rather than continuing the original startup. That makes the previous 240s success window unavailable and can turn slow-but-valid MSSQL starts into deterministic test failures.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. That is actually I'm investigating. If those 120 seconds will be a problem I will revert.

.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)}")
Expand Down
Loading