Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Try JobStateInfo
  • Loading branch information
jshigetomi committed Feb 17, 2026
commit ead6e9df4675d787be86466118da4935a02a5795
4 changes: 1 addition & 3 deletions test/Microsoft.PowerShell.ThreadJob.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,6 @@ Describe 'Job2 class API tests' -Tags 'CI' {
It 'Verifies terminating job error' {

$job = Start-ThreadJob -ScriptBlock { throw "My Job Error!" } | Wait-Job
$results = $job | Receive-Job 2>&1
$results | Should -Not -BeNullOrEmpty
$results[0].Exception.Message | Should -Be "My Job Error!"
$job.JobStateInfo.Reason.Message | Should -Be "My Job Error!"
}
}
Loading