Skip to content

Conversation

@tejksat
Copy link
Contributor

@tejksat tejksat commented Jul 7, 2016

Unable to setup a valuable integration test because TestDockerCmdExecFactory changes default DockerCmdExecFactoryImpl behavior in the way it becomes pointless. It creates WebTarget on every exec() invocation:

"main@1" prio=5 tid=0x1 nid=NA runnable
  java.lang.Thread.State: RUNNABLE
      at com.github.dockerjava.netty.WebTarget.<init>(WebTarget.java:28)
      at com.github.dockerjava.netty.DockerCmdExecFactoryImpl.getBaseResource(DockerCmdExecFactoryImpl.java:577)
      at com.github.dockerjava.netty.DockerCmdExecFactoryImpl.createCreateContainerCmdExec(DockerCmdExecFactoryImpl.java:396)
      at com.github.dockerjava.core.TestDockerCmdExecFactory$1.exec(TestDockerCmdExecFactory.java:103)
      at com.github.dockerjava.core.TestDockerCmdExecFactory$1.exec(TestDockerCmdExecFactory.java:100)
      at com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:35)
      at com.github.dockerjava.core.command.CreateContainerCmdImpl.exec(CreateContainerCmdImpl.java:177)
      ...

This change is Reviewable

@tejksat
Copy link
Contributor Author

tejksat commented Jul 7, 2016

@KostyaSha tests initialization fails with the response from Docker: {"message":"starting container with HostConfig was deprecated since v1.10 and removed in v1.12"}. I'm not sure if it is my fault. Could you please check?

@KostyaSha
Copy link
Member

docker-java isn't adopted to 1.24 yet. Working on it but firstly need end #620 , then IT on 1.11 docker version would work right.

@tejksat
Copy link
Contributor Author

tejksat commented Jul 7, 2016

@KostyaSha ok, thank you!

@marcuslinke
Copy link
Contributor

@tejksat Thanks for your contribution! LGTM.

@marcuslinke marcuslinke merged commit 1c14bc3 into docker-java:master Jul 9, 2016
@marcuslinke marcuslinke changed the title Fix for #625 Fix: Second execution of a docker command in Netty implementation always fails Jul 9, 2016
@tejksat tejksat deleted the fixWebTargetMutability branch July 12, 2016 12:19
panuse pushed a commit to TuKangTech/docker-java that referenced this pull request Aug 20, 2017
* Fix for docker-java#625

* Checkstyle errors fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants