| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
|
Can we add a regression test? |
Sorry, something went wrong.
Repo steps in original issue are too expensive/tricky. I don't know how create simple test. |
Sorry, something went wrong.
|
Ilya (@iSazonov) I agree. The original repro is too complex. It is unusual to not have a running pipeline and runspace, but engine events is one case. Another case might be Action script blocks on debugger breakpoints, but I don't think it is worth searching for another repro. |
Sorry, something went wrong.
|
Hi guys, I don't know what are your rules/policies in terms of regression tests when it comes to starting child shell in tests, but if that would not be an issue then what about a test like that : Describe "Testing if having 'finally' block in Powershell.Exiting engine event throws" {
It 'Should not throw when having finally block in Powershell.Exiting Action scriptblock' {
# WHEN
$output = pwsh {
Register-EngineEvent -SourceIdentifier Powershell.Exiting -Action {
try{
try{} finally{}
}
catch{ Write-Host "Exception" -Nonewline }
}
} | Out-String
# THEN
$output | Should -Not -BeLike "*Exception*"
}
}
would that be of any use ? |
Sorry, something went wrong.
|
We have quite a few tests that start child shells, so that shouldn't be an issue I wouldn't think. Thanks for putting that together! 💖 It might be a good idea to output the exception details rather than just a string, but that's a very good start, thanks! |
Sorry, something went wrong.
|
Ilya (@iSazonov) can you please check if that test prototype can be integrated to this PR? Thank you. |
Sorry, something went wrong.
|
Test was added. |
Sorry, something went wrong.
|
🎉v7.1.0-preview.1 has been released which incorporates this pull request.:tada: Handy links: |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Summary
Fix #11869
PR Context
PR Checklist