Skip to content
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

MS SQL Server not supported with correct url. #988

Closed
neetkee opened this issue Nov 23, 2018 · 1 comment
Closed

MS SQL Server not supported with correct url. #988

neetkee opened this issue Nov 23, 2018 · 1 comment

Comments

@neetkee
Copy link
Contributor

neetkee commented Nov 23, 2018

When specifying jdbc url for MS SQL Server like this:
jdbc:tc:sqlserver:2017-CU12://somehost:someport;databaseName=test
it will throw an exception:

Caused by: java.lang.UnsupportedOperationException: Database name sqlserver not supported
	at org.testcontainers.jdbc.ContainerDatabaseDriver.connect(ContainerDatabaseDriver.java:99) ~[jdbc-1.10.1.jar:na]
	at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:119) ~[HikariCP-3.2.0.jar:na]
	at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:369) ~[HikariCP-3.2.0.jar:na]
	at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:198) ~[HikariCP-3.2.0.jar:na]
	at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:467) ~[HikariCP-3.2.0.jar:na]
	at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:541) ~[HikariCP-3.2.0.jar:na]

Reason: MSSQLServerContainerProvider checks support by comparing variable NAME in MSSQLServerContainer with database type in url
Solution: change NAME to "sqlserver" to support connection url
Example project with error: https://github.com/neetkee/tc-mssql-naming

@neetkee neetkee changed the title MS SQL Server not supported with right url. MS SQL Server not supported with correct url. Nov 23, 2018
@kiview
Copy link
Member

kiview commented Jan 27, 2019

Fixed by #989

@kiview kiview closed this as completed Jan 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants