mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Fix test perf by stopping ongoing write-progress (#17749)
This commit is contained in:
@@ -384,18 +384,18 @@ Describe 'ActionPreference.Break tests' -Tag 'CI' {
|
||||
Write-Debug -Message 'This is a debug message'
|
||||
Write-Information -MessageData 'This is an information message'
|
||||
Write-Progress -Activity 'This shows progress'
|
||||
Write-Progress -Activity 'This shows progress' -Completed
|
||||
}
|
||||
Test-Break -WarningAction Break -InformationAction Break *>$null
|
||||
$WarningPreference = $VerbosePreference = $DebugPreference = $InformationPreference = $ProgressPreference = [System.Management.Automation.ActionPreference]::Break
|
||||
Test-Break *>$null
|
||||
}
|
||||
|
||||
$results = @(Test-Debugger -Scriptblock $testScript)
|
||||
}
|
||||
|
||||
It 'Should show 7 debugger commands were invoked' {
|
||||
It 'Should show 8 debugger commands were invoked' {
|
||||
# When no debugger commands are provided, 'c' is invoked every time a breakpoint is hit
|
||||
$results.Count | Should -Be 7
|
||||
$results.Count | Should -Be 8
|
||||
}
|
||||
|
||||
It 'Write-Warning should trigger a breakpoint from -WarningAction Break' {
|
||||
|
||||
Reference in New Issue
Block a user