-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Add retry to Enter-PSHostProcess test #11360
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
Add retry to Enter-PSHostProcess test #11360
Conversation
| $ps.AddScript('$pid').Invoke() | Should -Be $pwshId | ||
| $ps.AddScript('$pid') | ||
|
|
||
| [int]$retry = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use Wait-UntilTrue from HelpersCommon.psm1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If not, maybe add a retry function on HelpersCommon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I worked out a Invoke-ScriptBlockWithRetry function, but it doesn't save much and makes the code harder to understand since I need to pass two types of information back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
🎉 Handy links: |
PR Summary
Been seeing this test fail in CI on occasion. Have it retry 5 times and also write out a verbose message if the runspace state is not valid to see why it fails.
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.