@@ -39,11 +39,13 @@ public DockerClientImpl createDockerClient(DockerClientConfig config) {
3939 public DockerClientImpl createDockerClient (DockerClientConfig config ) {
4040 return (DockerClientImpl ) DockerClientBuilder .getInstance (config )
4141 .withDockerHttpClient (
42- new JerseyDockerHttpClient .Builder ()
43- .dockerHost (config .getDockerHost ())
44- .sslConfig (config .getSSLConfig ())
45- .connectTimeout (30 * 1000 )
46- .build ()
42+ new TrackingDockerHttpClient (
43+ new JerseyDockerHttpClient .Builder ()
44+ .dockerHost (config .getDockerHost ())
45+ .sslConfig (config .getSSLConfig ())
46+ .connectTimeout (30 * 1000 )
47+ .build ()
48+ )
4749 )
4850 .build ();
4951 }
@@ -53,11 +55,13 @@ public DockerClientImpl createDockerClient(DockerClientConfig config) {
5355 public DockerClientImpl createDockerClient (DockerClientConfig config ) {
5456 return (DockerClientImpl ) DockerClientBuilder .getInstance (config )
5557 .withDockerHttpClient (
56- new OkDockerHttpClient .Builder ()
57- .dockerHost (config .getDockerHost ())
58- .sslConfig (config .getSSLConfig ())
59- .connectTimeout (30 * 100 )
60- .build ()
58+ new TrackingDockerHttpClient (
59+ new OkDockerHttpClient .Builder ()
60+ .dockerHost (config .getDockerHost ())
61+ .sslConfig (config .getSSLConfig ())
62+ .connectTimeout (30 * 100 )
63+ .build ()
64+ )
6165 )
6266 .build ();
6367 }
@@ -67,10 +71,12 @@ public DockerClientImpl createDockerClient(DockerClientConfig config) {
6771 public DockerClientImpl createDockerClient (DockerClientConfig config ) {
6872 return (DockerClientImpl ) DockerClientBuilder .getInstance (config )
6973 .withDockerHttpClient (
70- new ApacheDockerHttpClient .Builder ()
71- .dockerHost (config .getDockerHost ())
72- .sslConfig (config .getSSLConfig ())
73- .build ()
74+ new TrackingDockerHttpClient (
75+ new ApacheDockerHttpClient .Builder ()
76+ .dockerHost (config .getDockerHost ())
77+ .sslConfig (config .getSSLConfig ())
78+ .build ()
79+ )
7480 )
7581 .build ();
7682 }
@@ -110,4 +116,6 @@ public FactoryType getFactoryType() {
110116 @ Rule
111117 public DockerRule dockerRule = new DockerRule ( this );
112118
119+ @ Rule
120+ public DockerHttpClientLeakDetector leakDetector = new DockerHttpClientLeakDetector ();
113121}
0 commit comments