-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Invoke-WebRequest/RestMethod: Improve reliability of CTRL-C tests #19532
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
Invoke-WebRequest/RestMethod: Improve reliability of CTRL-C tests #19532
Conversation
Lengthen the race window from milliseconds to seconds. Don't sleep any longer than necessary if a task has already completed.
I'm seeing failure of an unrelated test on MacOS: |
test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1
Outdated
Show resolved
Hide resolved
test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1
Outdated
Show resolved
Hide resolved
test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1
Outdated
Show resolved
Hide resolved
@daxian-dbw I have made all changes as suggested in case this is exactly what you wanted. Let me know if you want me to dial back the delay a bit so the tests don't take so long to run. I split the brotli/deflate/gzip tests into separate cases as well. |
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.
Thanks for the clarification and reverting the changes.
test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1
Show resolved
Hide resolved
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. Thanks @stevenebutler!
🎉 Handy links: |
Closes #19531
PR Summary
Addresses request by @daxian-dbw in #19330
Raised as #19531
PR Context
CTRL C tests rely races on timeouts that had time-frames in 100s of milliseconds. These may be too tight when running in CI where resources are stretched. Increased the timeouts and changed logic so it only waits as long as necessary if possible.
PR Checklist
.h
,.cpp
,.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
or[ WIP ]
to the beginning of the title (theWIP
bot will keep its status check atPending
while the prefix is present) and remove the prefix when the PR is ready.(which runs in a different PS Host).