Skip to content
This repository has been archived by the owner on Sep 21, 2018. It is now read-only.

Commit

Permalink
Prep 1.6.0 release (#13)
Browse files Browse the repository at this point in the history
* Bump POMs and Changelogs for 1.6.0 release

* Disable `useSSL` query param for Oracle/SQL Server modules
Temporary fix for testcontainers/testcontainers-java#568
  • Loading branch information
rnorth committed Jan 30, 2018
1 parent f2321ce commit e4ef229
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Change Log
All notable changes to this project will be documented in this file.

## [1.6.0] - 2018-01-30
### Changes
- Updated to depend upon with Testcontainers core library v1.6.0

## [1.5.1] - 2017-12-19
### Changes
- Updated to depend upon with Testcontainers core library v1.5.1
Expand All @@ -14,6 +18,7 @@ All notable changes to this project will be documented in this file.
- First release published to Maven Central
- Updated to depend upon with Testcontainers core library v1.4.3

[1.6.0]: https://github.com/testcontainers/testcontainers-java-module-mssqlserver/releases/tag/1.6.0
[1.5.1]: https://github.com/testcontainers/testcontainers-java-module-mssqlserver/releases/tag/1.5.1
[1.5.0]: https://github.com/testcontainers/testcontainers-java-module-mssqlserver/releases/tag/1.5.0
[1.4.3]: https://github.com/testcontainers/testcontainers-java-module-mssqlserver/releases/tag/1.4.3
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers-parent</artifactId>
<version>1.5.1</version><!-- TESTCONTAINERS RELEASE VERSION -->
<version>1.6.0</version><!-- TESTCONTAINERS RELEASE VERSION -->
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
package org.testcontainers.containers;

import org.rnorth.ducttape.unreliables.Unreliables;

import java.sql.Connection;
import java.sql.Driver;
import java.sql.SQLException;
import java.util.Properties;
import java.util.concurrent.TimeUnit;

/**
* @author Stefan Hufschmidt
*/
Expand Down Expand Up @@ -55,4 +63,21 @@ public String getPassword() {
public String getTestQueryString() {
return "SELECT 1";
}

// TODO: Replace with permanent solution to https://github.com/testcontainers/testcontainers-java/issues/568
@Override
public Connection createConnection(String queryString) throws SQLException {
final Properties info = new Properties();
info.put("user", this.getUsername());
info.put("password", this.getPassword());
final String url = this.getJdbcUrl() + queryString;

final Driver jdbcDriverInstance = getJdbcDriverInstance();

try {
return Unreliables.retryUntilSuccess(120, TimeUnit.SECONDS, () -> jdbcDriverInstance.connect(url, info));
} catch (Exception e) {
throw new SQLException("Could not create new connection", e);
}
}
}

0 comments on commit e4ef229

Please sign in to comment.