Skip to content

Commit f1595c4

Browse files
authored
Fix test perf by stopping ongoing write-progress (PowerShell#17749)
1 parent 8eb37cc commit f1595c4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/powershell/Language/Scripting/ActionPreference.Tests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,18 +384,18 @@ Describe 'ActionPreference.Break tests' -Tag 'CI' {
384384
Write-Debug -Message 'This is a debug message'
385385
Write-Information -MessageData 'This is an information message'
386386
Write-Progress -Activity 'This shows progress'
387+
Write-Progress -Activity 'This shows progress' -Completed
387388
}
388389
Test-Break -WarningAction Break -InformationAction Break *>$null
389390
$WarningPreference = $VerbosePreference = $DebugPreference = $InformationPreference = $ProgressPreference = [System.Management.Automation.ActionPreference]::Break
390391
Test-Break *>$null
391392
}
392-
393393
$results = @(Test-Debugger -Scriptblock $testScript)
394394
}
395395

396-
It 'Should show 7 debugger commands were invoked' {
396+
It 'Should show 8 debugger commands were invoked' {
397397
# When no debugger commands are provided, 'c' is invoked every time a breakpoint is hit
398-
$results.Count | Should -Be 7
398+
$results.Count | Should -Be 8
399399
}
400400

401401
It 'Write-Warning should trigger a breakpoint from -WarningAction Break' {

0 commit comments

Comments
 (0)