Skip to content

Commit f353266

Browse files
authored
Hard deprecate ProxiedUnixSocketClientProviderStrategy (#2851)
1 parent 7ba0657 commit f353266

File tree

4 files changed

+8
-31
lines changed

4 files changed

+8
-31
lines changed

core/build.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,6 @@ dependencies {
155155
exclude(group: "net.java.dev.jna", module: "jna")
156156
}
157157

158-
compile ('org.rnorth:tcp-unix-socket-proxy:1.0.2') {
159-
exclude(group: "log4j", module: "log4j")
160-
}
161-
162158
compile "net.java.dev.jna:jna-platform:5.5.0"
163159

164160
shaded ('com.github.docker-java:docker-java-transport-okhttp:3.2.1') {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ protected boolean isPersistable() {
3131

3232
@Override
3333
protected int getPriority() {
34-
return ProxiedUnixSocketClientProviderStrategy.PRIORITY - 10;
34+
return EnvironmentAndSystemPropertyClientProviderStrategy.PRIORITY - 100;
3535
}
3636

3737
@Override
Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
package org.testcontainers.dockerclient;
22

3-
import lombok.extern.slf4j.Slf4j;
4-
import org.rnorth.tcpunixsocketproxy.TcpToUnixSocketProxy;
5-
6-
import java.io.File;
7-
8-
@Slf4j
3+
/**
4+
* @deprecated no longer needed since `docker-java` supports all transport modes now
5+
*/
6+
@Deprecated
97
public class ProxiedUnixSocketClientProviderStrategy extends UnixSocketClientProviderStrategy {
108

119
public static final int PRIORITY = EnvironmentAndSystemPropertyClientProviderStrategy.PRIORITY - 100;
1210

13-
private final File socketFile = new File(DOCKER_SOCK_PATH);
14-
1511
@Override
1612
protected boolean isApplicable() {
17-
return socketFile.exists();
13+
return false;
1814
}
1915

2016
@Override
@@ -24,26 +20,12 @@ protected int getPriority() {
2420

2521
@Override
2622
public void test() throws InvalidConfigurationException {
27-
TcpToUnixSocketProxy proxy = new TcpToUnixSocketProxy(socketFile);
28-
29-
try {
30-
int proxyPort = proxy.start().getPort();
31-
32-
config = tryConfiguration("tcp://localhost:" + proxyPort);
33-
34-
log.debug("Accessing unix domain socket via TCP proxy (" + DOCKER_SOCK_PATH + " via localhost:" + proxyPort + ")");
35-
} catch (Exception e) {
36-
37-
proxy.stop();
38-
39-
throw new InvalidConfigurationException("ping failed", e);
40-
}
41-
23+
throw new InvalidConfigurationException("Deprecated");
4224
}
4325

4426
@Override
4527
public String getDescription() {
46-
return "local Unix socket (via TCP proxy)";
28+
return "[Deprecated] local Unix socket (via TCP proxy)";
4729
}
4830

4931
}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
org.testcontainers.dockerclient.EnvironmentAndSystemPropertyClientProviderStrategy
22
org.testcontainers.dockerclient.UnixSocketClientProviderStrategy
3-
org.testcontainers.dockerclient.ProxiedUnixSocketClientProviderStrategy
43
org.testcontainers.dockerclient.DockerMachineClientProviderStrategy
54
org.testcontainers.dockerclient.WindowsClientProviderStrategy
65
org.testcontainers.dockerclient.NpipeSocketClientProviderStrategy

0 commit comments

Comments
 (0)