Open
Conversation
This fixes two issues with the implementation of output_if_timeout:
1. The raw byte data was sent to the logger. In order to improve
improve readability, the output is now decoded and stdout and stderr
is separated by a header/footer.
2. The parameter handled only the timeout generated by the library,
not the timeout generated by robot. Now both timeouts write the output
to the logger, if output_if_timeout=True
Additionally for paramiko, a last read of the channel is done, to fetch
as much of the output available as possible.
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.
We are running some long running tests with a default test timeout. It is very annoying, to not have the output of the test for analysis of random timeouts. Therefore I hacked a monkey patches solution before, that enabled me, to fetch the output of the last command, that was not completely executed in Test Teardown.
After updating sshlibrary, I thought it was a good point, to refine this and output_if_timeout is now available, but sadly not really a good option, because it requires a timeout parameter for the Execute Command / Read Output instead of using the Test Timeout. On top of that the output is not decoded and printed as an array of byte data, that would require post processing, to make it readable.
This fixes two issues with the implementation of output_if_timeout:
improve readability, the output is now decoded and stdout and stderr
is separated by a header/footer.
not the timeout generated by robot. Now both timeouts write the output
to the logger, if output_if_timeout=True
Additionally for paramiko, a last read of the channel is done, to fetch
as much of the output available as possible.