Skip to content

Commit

Permalink
#291 relax the condition
Browse files Browse the repository at this point in the history
  • Loading branch information
bsideup authored and rnorth committed Mar 3, 2017
1 parent e8bf32e commit aaa1fda
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 aaa1fda

Please sign in to comment.