Fix containerIsRunning: NotFound = not running
@@ -4762,8 +4762,13 @@ public class DefaultDockerClientTest {
final String containerId) {
return new Callable<Boolean>() {
public Boolean call() throws Exception {
+ try {
final ContainerInfo containerInfo = client.inspectContainer(containerId);
return containerInfo.state().running();
+ } catch (ContainerNotFoundException ignored) {
+ // Ignore exception. If container is not found, it is not running.
+ return false;
+ }
}
};
}
