-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Ensure Wait-UntilTrue returns $true in Pester tests #9458
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
Ensure Wait-UntilTrue returns $true in Pester tests #9458
Conversation
* Ensure Wait-UntilTrue returns $true in Pester tests * Mark a ConvertTo-Json test as Pendingc due to test failure
|
Test failure on PowerShell-CI-linux appears to be unrelated to this PR, probably caused by #9250. |
test/powershell/Language/Scripting/Debugging/Debugging.Tests.ps1
Outdated
Show resolved
Hide resolved
Use `Should -BeTrue` instead of `Should -BeExactly $true`.
test/powershell/Modules/Microsoft.PowerShell.Utility/ConvertTo-Json.Tests.ps1
Show resolved
Hide resolved
| } | ||
| # Wait | ||
| Start-Sleep -Milliseconds $intervalInMilliseconds | ||
| Start-Sleep -Milliseconds $intervalInMilliseconds > $null |
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.
This should not be needed, but won't hurt anything
iSazonov
left a comment
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 with one request to open a tracking issue.
|
Opened #9489 for |
PR Summary
PR Context
Pester tests should check if the function Wait-UntilTrue actually returns $true rather than timing out.
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.