-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to customise DevServices URL #15749
Conversation
System.out | ||
.println("[INFO] H2 database started in TCP server mode; server status: " + tcpServer.getStatus()); | ||
String connectionUrl = "jdbc:h2:tcp://localhost:" + tcpServer.getPort() + "/mem:" | ||
+ datasourceName.orElse("default") | ||
+ ";DB_CLOSE_DELAY=-1"; | ||
+ ";DB_CLOSE_DELAY=-1" + additionalArgs.toString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ah, I was going to ask about DB_CLOSE_DELAY
.
} | ||
String jdbcUrl = container.getJdbcUrl(); | ||
if (additionalArgs.length() > 0) { | ||
if (jdbcUrl.contains("?")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MSSQL is actually a bit special in this regard. The parameters are not separated using ?
and &
. Please have a look at https://github.com/testcontainers/testcontainers-java/blob/master/modules/mssqlserver/src/main/java/org/testcontainers/containers/MSSQLServerContainer.java#L94-L95.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@knutwannheden would you be willing to prepare a PR to adjust that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sure.
Fixes #15579