Khazrak / JDocker

Java Docker Client
Other
10 stars 2 forks source link

Deadlocks? #1

Closed pavradev closed 7 years ago

pavradev commented 7 years ago

Both for MacOS with docker-engine 1.12.0 and Ubuntu 14.04 with docker-engine 1.12.3 this tests run infinitely:

    @Test
    public void testNetwork(){
        NetworkCreateRequest networkCreateRequest = NetworkCreateRequest.builder()
                .name("test-net")
                .checkDuplicate(true)
                .driver("bridge")
                .build();
        dockerClient.createNetwork(networkCreateRequest);
        dockerClient.removeNetwork("test-net");
    }

    @Test
    public void testContainer(){
        ContainerCreationRequest containerCreationRequest = ContainerCreationRequest.builder()
                .name("test-container")
                .image("ekino/wiremock:2.1.11")
                .build();
        dockerClient.createContainer(containerCreationRequest);
        dockerClient.restart("test-container");
        dockerClient.stop("test-container");
    }
Khazrak commented 7 years ago

Not infinitely, just 30 minutes for every command (a weird connection-timeout value). I have now switched the implementation and tried your tests, thety now work. @pavradev Can you verify fix? (new release 1.1 will be up very soon on maven central, or use github release)

pavradev commented 7 years ago

You still have version 1.0 in the build.gradle for release 1.1

pavradev commented 7 years ago

Also have a look at build failure for 1.1 release in jitpack.io https://jitpack.io/com/github/khazrak/jdocker/1.1/build.log

Khazrak commented 7 years ago

Now added empty credentials so it won't complain about no such property and updated the release to have 1.1 instead of 1.0