Catch a timeout error in docker

Fix #936
This commit is contained in:
Julien Duponchelle committed 2017-03-16 10:39:08 +01:00
1 parent cb6f94bc24
commit 08bafc2dcc
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -768,7 +768,7 @@ class DockerVM(BaseNode):
Pull image from docker repository
"""
log.info("Pull %s from docker hub", image)
response = yield from self.manager.http_query("POST", "images/create", params={"fromImage": image})
response = yield from self.manager.http_query("POST", "images/create", params={"fromImage": image}, timeout=None)
# The pull api will stream status via an HTTP JSON stream
content = ""
while True:
+1 -1
View File
@@ -819,7 +819,7 @@ def test_pull_image(loop, vm):
with asyncio_patch("gns3server.compute.docker.Docker.http_query", return_value=mock_query) as mock:
images = loop.run_until_complete(asyncio.async(vm.pull_image("ubuntu")))
mock.assert_called_with("POST", "images/create", params={"fromImage": "ubuntu"})
mock.assert_called_with("POST", "images/create", params={"fromImage": "ubuntu"}, timeout=None)
def test_start_capture(vm, tmpdir, manager, free_console_port, loop):