cloud_tests: emit dots on Travis while fetching images#347
Merged
Conversation
b3c8764 to
408d03b
Compare
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.
Collaborator
Author
|
We can see in https://travis-ci.org/github/canonical/cloud-init/jobs/683935711 that dots are emitted as expected (search for "acquiring image for"), this is ready for review. |
lucasmoura
approved these changes
May 11, 2020
Contributor
lucasmoura
left a comment
There was a problem hiding this comment.
Just a consideration that in the PR description it is said that the code will emit a dot every 60 seconds, while the actual code emits a dot every 10s. I don't know if that is what we want, the 10s wait, but it it is, no problem.
Collaborator
Author
|
Good catch, thanks Lucas! |
blackboxsw
approved these changes
May 13, 2020
Collaborator
blackboxsw
left a comment
There was a problem hiding this comment.
+1 here. needs rebase and merge, but otherwise good.
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This ensures that Travis will not kill our tests if fetching images is
taking a long time.
In implementation turns, 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.