File tree Expand file tree Collapse file tree
src/test/java/com/github/dockerjava Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ public void testWaitContainerAbort() throws Exception {
106106 @ Test
107107 public void testWaitContainerTimeout () throws Exception {
108108
109- CreateContainerResponse container = dockerClient .createContainerCmd ("busybox" ).withCmd ("sleep" , "9999 " ).exec ();
109+ CreateContainerResponse container = dockerClient .createContainerCmd ("busybox" ).withCmd ("sleep" , "10 " ).exec ();
110110
111111 LOG .info ("Created container: {}" , container .toString ());
112112 assertThat (container .getId (), not (isEmptyString ()));
@@ -121,12 +121,5 @@ public void testWaitContainerTimeout() throws Exception {
121121 } catch (DockerClientException e ){
122122 LOG .info (e .getMessage ());
123123 }
124-
125- dockerClient .killContainerCmd (container .getId ()).exec ();
126-
127- InspectContainerResponse inspectContainerResponse = dockerClient .inspectContainerCmd (container .getId ()).exec ();
128- LOG .info ("Container Inspect: {}" , inspectContainerResponse .toString ());
129-
130- assertThat (inspectContainerResponse .getState ().getRunning (), is (equalTo (false )));
131124 }
132125}
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ public void testWaitContainerAbort() throws Exception {
109109 @ Test
110110 public void testWaitContainerTimeout () throws Exception {
111111
112- CreateContainerResponse container = dockerClient .createContainerCmd ("busybox" ).withCmd ("sleep" , "9999 " ).exec ();
112+ CreateContainerResponse container = dockerClient .createContainerCmd ("busybox" ).withCmd ("sleep" , "10 " ).exec ();
113113
114114 LOG .info ("Created container: {}" , container .toString ());
115115 assertThat (container .getId (), not (isEmptyString ()));
@@ -124,12 +124,5 @@ public void testWaitContainerTimeout() throws Exception {
124124 } catch (DockerClientException e ){
125125 LOG .info (e .getMessage ());
126126 }
127-
128- dockerClient .killContainerCmd (container .getId ()).exec ();
129-
130- InspectContainerResponse inspectContainerResponse = dockerClient .inspectContainerCmd (container .getId ()).exec ();
131- LOG .info ("Container Inspect: {}" , inspectContainerResponse .toString ());
132-
133- assertThat (inspectContainerResponse .getState ().getRunning (), is (equalTo (false )));
134127 }
135128}
You can’t perform that action at this time.
0 commit comments