Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mafredri
Copy link
Member

With this PR we now always buffer command output.

The ExpectMatch function was also refactored a bit to avoid a race where a timeout could fire whilst writing to buffer (concurrent read/write), or a timeout could fail the test just as it succeeds.

Fixes #2122

@mafredri mafredri self-assigned this Jul 25, 2022
@mafredri mafredri requested a review from a team July 25, 2022 13:46
Copy link
Member

@kylecarbs kylecarbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Awesome change that should reduce a LOT of potential races. 😎

@mafredri mafredri merged commit 92a95fb into main Jul 25, 2022
@mafredri mafredri deleted the mafredri/ptytest-buffer-output branch July 25, 2022 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tests using Cobra with ptytest can hang on macOS (and Windows) unless the output is consumed

3 participants