Skip to content

Commit 2e1191e

Browse files
authored
Merge branch 'main' into main
2 parents ba9ed2f + d83653d commit 2e1191e

File tree

14 files changed

+41
-28
lines changed

14 files changed

+41
-28
lines changed

core/src/main/java/org/testcontainers/dockerclient/DockerClientProviderStrategy.java

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -401,21 +401,34 @@ public static DockerClient getClientForConfig(TransportConfig transportConfig) {
401401
throw new IllegalArgumentException("Unknown transport type '" + transportType + "'");
402402
}
403403

404-
DefaultDockerClientConfig.Builder configBuilder = DefaultDockerClientConfig.createDefaultConfigBuilder();
404+
DefaultDockerClientConfig.Builder configBuilder = DefaultDockerClientConfig
405+
.createDefaultConfigBuilder()
406+
.withDockerHost(transportConfig.getDockerHost().toString());
405407

406-
if (configBuilder.build().getApiVersion() == RemoteApiVersion.UNKNOWN_VERSION) {
407-
configBuilder.withApiVersion(RemoteApiVersion.VERSION_1_44);
408-
}
409408
Map<String, String> headers = new HashMap<>();
410409
headers.put("x-tc-sid", DockerClientFactory.SESSION_ID);
411410
headers.put("User-Agent", String.format("tc-java/%s", DockerClientFactory.TESTCONTAINERS_VERSION));
412411

413-
return DockerClientImpl.getInstance(
414-
new AuthDelegatingDockerClientConfig(
415-
configBuilder.withDockerHost(transportConfig.getDockerHost().toString()).build()
416-
),
417-
new HeadersAddingDockerHttpClient(dockerHttpClient, headers)
418-
);
412+
try {
413+
if (configBuilder.build().getApiVersion() == RemoteApiVersion.UNKNOWN_VERSION) {
414+
configBuilder.withApiVersion(RemoteApiVersion.VERSION_1_44);
415+
}
416+
DockerClient client = DockerClientImpl.getInstance(
417+
new AuthDelegatingDockerClientConfig(configBuilder.build()),
418+
new HeadersAddingDockerHttpClient(dockerHttpClient, headers)
419+
);
420+
log.debug("Pinging Docker API version 1.44.");
421+
client.pingCmd().exec();
422+
return client;
423+
} catch (Exception ex) {
424+
log.debug("Fallback to Docker API version 1.32.");
425+
return DockerClientImpl.getInstance(
426+
new AuthDelegatingDockerClientConfig(
427+
configBuilder.withApiVersion(RemoteApiVersion.VERSION_1_32).build()
428+
),
429+
new HeadersAddingDockerHttpClient(dockerHttpClient, headers)
430+
);
431+
}
419432
}
420433

421434
public synchronized String getDockerHostIpAddress() {

modules/azure/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ dependencies {
44
api project(':testcontainers')
55
api project(':testcontainers-mssqlserver')
66
// TODO use JDK's HTTP client and/or Apache HttpClient5
7-
shaded 'com.squareup.okhttp3:okhttp:5.1.0'
7+
shaded 'com.squareup.okhttp3:okhttp:5.3.2'
88

99
testImplementation platform("com.azure:azure-sdk-bom:1.2.32")
1010
testImplementation 'com.azure:azure-cosmos'

modules/couchbase/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description = "Testcontainers :: Couchbase"
33
dependencies {
44
api project(':testcontainers')
55
// TODO use JDK's HTTP client and/or Apache HttpClient5
6-
shaded 'com.squareup.okhttp3:okhttp:5.1.0'
6+
shaded 'com.squareup.okhttp3:okhttp:5.3.2'
77

88
testImplementation 'com.couchbase.client:java-client:3.9.1'
99
testImplementation 'org.awaitility:awaitility:4.3.0'

modules/jdbc-test/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ dependencies {
1111
api 'org.apache.tomcat:tomcat-jdbc:11.0.14'
1212
api 'org.vibur:vibur-dbcp:26.0'
1313
api 'com.mysql:mysql-connector-j:9.5.0'
14-
api 'org.junit.jupiter:junit-jupiter:5.13.4'
14+
api 'org.junit.jupiter:junit-jupiter:5.14.1'
1515
}

modules/junit-jupiter/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ description = "Testcontainers :: JUnit Jupiter Extension"
22

33
dependencies {
44
api project(':testcontainers')
5-
implementation platform('org.junit:junit-bom:5.13.4')
5+
implementation platform('org.junit:junit-bom:5.14.1')
66
implementation 'org.junit.jupiter:junit-jupiter-api'
77

88
testImplementation project(':testcontainers-mysql')
99
testImplementation project(':testcontainers-postgresql')
1010
testImplementation 'com.zaxxer:HikariCP:7.0.2'
11-
testImplementation 'redis.clients:jedis:6.2.0'
11+
testImplementation 'redis.clients:jedis:7.1.0'
1212
testImplementation 'org.apache.httpcomponents:httpclient:4.5.14'
1313
testImplementation ('org.mockito:mockito-core:4.11.0') {
1414
exclude(module: 'hamcrest-core')
1515
}
1616

1717
testRuntimeOnly 'org.postgresql:postgresql:42.7.8'
18-
testRuntimeOnly 'com.mysql:mysql-connector-j:8.2.0'
18+
testRuntimeOnly 'com.mysql:mysql-connector-j:9.5.0'
1919
}

modules/mysql/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ dependencies {
77
compileOnly 'io.asyncer:r2dbc-mysql:1.4.1'
88

99
testImplementation project(':testcontainers-jdbc-test')
10-
testRuntimeOnly 'com.mysql:mysql-connector-j:8.2.0'
10+
testRuntimeOnly 'com.mysql:mysql-connector-j:9.5.0'
1111

1212
testImplementation testFixtures(project(':testcontainers-r2dbc'))
1313
testRuntimeOnly 'io.asyncer:r2dbc-mysql:1.4.1'

modules/oceanbase/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ dependencies {
44
api project(':testcontainers-jdbc')
55

66
testImplementation project(':testcontainers-jdbc-test')
7-
testRuntimeOnly 'com.mysql:mysql-connector-j:8.2.0'
7+
testRuntimeOnly 'com.mysql:mysql-connector-j:9.5.0'
88
}

modules/orientdb/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ description = "Testcontainers :: Orientdb"
33
dependencies {
44
api project(":testcontainers")
55

6-
api "com.orientechnologies:orientdb-client:3.2.44"
6+
api "com.orientechnologies:orientdb-client:3.2.46"
77

8-
testImplementation 'org.apache.tinkerpop:gremlin-driver:3.7.4'
9-
testImplementation "com.orientechnologies:orientdb-gremlin:3.2.44"
8+
testImplementation 'org.apache.tinkerpop:gremlin-driver:3.8.0'
9+
testImplementation "com.orientechnologies:orientdb-gremlin:3.2.46"
1010
}

modules/questdb/src/test/java/org/testcontainers/QuestDBTestImages.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
import org.testcontainers.utility.DockerImageName;
44

55
public interface QuestDBTestImages {
6-
DockerImageName QUESTDB_IMAGE = DockerImageName.parse("questdb/questdb:6.5.3");
6+
DockerImageName QUESTDB_IMAGE = DockerImageName.parse("questdb/questdb:9.2.2");
77
}

modules/questdb/src/test/java/org/testcontainers/junit/questdb/SimpleQuestDBTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class SimpleQuestDBTest extends AbstractContainerDatabaseTest {
2626
@Test
2727
void testSimple() throws SQLException {
2828
try ( // container {
29-
QuestDBContainer questDB = new QuestDBContainer("questdb/questdb:6.5.3")
29+
QuestDBContainer questDB = new QuestDBContainer("questdb/questdb:9.2.2")
3030
// }
3131
) {
3232
questDB.start();

0 commit comments

Comments
 (0)