From 089408751cdbd7950f58616f9d85ff9dfd9aa3c7 Mon Sep 17 00:00:00 2001 From: Daniel Watkins Date: Thu, 14 May 2020 09:27:44 -0400 Subject: cloud_tests: emit dots on Travis while fetching images (#347) This ensures that Travis will not kill our tests if fetching images is taking a long time. In implementation terms, this introduces a context manager which will spin up a multiprocessing.Process in the background and print a dot to stdout every 10 seconds. The process is terminated when the context manager exits. This also drop the use of travis_wait, which was being used to work around this issue. --- tests/cloud_tests/platforms/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/cloud_tests/platforms') diff --git a/tests/cloud_tests/platforms/__init__.py b/tests/cloud_tests/platforms/__init__.py index 6a410b84..e506baa0 100644 --- a/tests/cloud_tests/platforms/__init__.py +++ b/tests/cloud_tests/platforms/__init__.py @@ -6,6 +6,7 @@ from .ec2 import platform as ec2 from .lxd import platform as lxd from .nocloudkvm import platform as nocloudkvm from .azurecloud import platform as azurecloud +from ..util import emit_dots_on_travis PLATFORMS = { 'ec2': ec2.EC2Platform, @@ -17,7 +18,8 @@ PLATFORMS = { def get_image(platform, config): """Get image from platform object using os_name.""" - return platform.get_image(config) + with emit_dots_on_travis(): + return platform.get_image(config) def get_instance(snapshot, *args, **kwargs): -- cgit v1.2.3