Skip to content

Commit

Permalink
#291 relax the condition
Browse files Browse the repository at this point in the history
  • Loading branch information
bsideup committed Feb 22, 2017
1 parent 63a57d6 commit 73accee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class DockerClientFactory {
new UnixSocketClientProviderStrategy(),
new ProxiedUnixSocketClientProviderStrategy(),
new DockerMachineClientProviderStrategy(),
new NamedPipeSocketClientProviderStrategy());
new WindowsClientProviderStrategy());
private String activeApiVersion;
private String activeExecutionDriver;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,13 @@
import com.github.dockerjava.core.DockerClientConfig;
import org.jetbrains.annotations.NotNull;

import java.io.File;

public class NamedPipeSocketClientProviderStrategy extends DockerClientProviderStrategy {
public class WindowsClientProviderStrategy extends DockerClientProviderStrategy {

private static final int PING_TIMEOUT_DEFAULT = 5;
private static final String PING_TIMEOUT_PROPERTY_NAME = "testcontainers.namedpipesocketprovider.timeout";

@Override
public void test() throws InvalidConfigurationException {
if (!new File("\\\\.\\pipe\\docker_engine").exists()) {
throw new InvalidConfigurationException("this strategy only works with Docker for Windows");
}

config = tryConfiguration("tcp://localhost:2375");
}

Expand Down

0 comments on commit 73accee

Please sign in to comment.