New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capture and log output of processes that timed out and were killed #47976

Merged
merged 2 commits into from Jun 6, 2018

Conversation

Projects
None yet
2 participants
@terminalmage
Member

terminalmage commented Jun 5, 2018

Before, tests.support.case.ShellTestCase.run_script would just go ¯\_(ツ)_/¯ and return that it killed the process. But you can still run .communicate() on a process that was terminated, so this commit does that and uses it to log the output from the killed process.

Refs: saltstack/salt-jenkins#1000

Capture and log output of processes that timed out and were killed
Before, tests.support.case.ShellTestCase.run_script would just go
¯\_(ツ)_/¯ and return that it killed the process. But you can still run
`.communicate()` on a process that was terminated, so this commit does
that and uses it to log the output from the killed process.
Add catch_timeout to run_script
One of the tests depends on forcing a timeout, but since we no longer
include the timeout message in the stdout/stderr return, we needed a way
to return whether or not the script timed out.

@rallytime rallytime merged commit 76068c8 into saltstack:2018.3 Jun 6, 2018

5 of 9 checks passed

jenkins/PR/salt-pr-linode-cent7-py3 Pull Requests » Salt PR - Linode CentOS 7 - PY3 #5541 — ABORTED
Details
jenkins/PR/salt-pr-rs-cent7-n Pull Requests » Salt PR - RS CentOS 7 #19596 — ABORTED
Details
default Build finished.
Details
jenkins/PR/salt-pr-docs-n Pull Requests » Salt PR - Docs #17806 — FAILURE
Details
WIP ready for review
Details
jenkins/PR/salt-pr-clone Pull Requests » Salt PR - Clone #25739 — SUCCESS
Details
jenkins/PR/salt-pr-linode-ubuntu14-n Pull Requests » Salt PR - Linode Ubuntu14.04 #23473 — SUCCESS
Details
jenkins/PR/salt-pr-linode-ubuntu16-py3 Pull Requests » Salt PR - Linode Ubuntu16.04 - PY3 #10513 — SUCCESS
Details
jenkins/PR/salt-pr-lint-n Pull Requests » Salt PR - Code Lint #22437 — SUCCESS
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment