Skip to content

Commit 1851e1a

Browse files
SteveL-MSFTdaxian-dbw
authored andcommitted
fixed test on Windows, also should have been pending due to another bug (PowerShell#2580)
1 parent 5aee4ba commit 1851e1a

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

test/powershell/Language/Scripting/NativeExecution/NativeCommandProcessor.Tests.ps1

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,12 @@ Describe "Native Command Processor" -tags "Feature" {
1111

1212
# If powershell receives a StopProcessing, it should kill the native process and all child processes
1313

14-
# this test should pass and no longer Penidng when #2561 is fixed
15-
It "Should kill native process tree" {
16-
17-
Test-Path $createchildprocess | Should Be $true
14+
# this test should pass and no longer Pending when #2561 is fixed
15+
It "Should kill native process tree" -Pending {
1816

1917
# make sure no test processes are running
2018
# on Linux, the Process class truncates the name so filter using Where-Object
21-
Get-Process | Where-Object {$_.Name -like 'createchildproc'} | Stop-Process
19+
Get-Process | Where-Object {$_.Name -like 'createchildproc*'} | Stop-Process
2220

2321
[int] $numToCreate = 2
2422

@@ -30,7 +28,7 @@ Describe "Native Command Processor" -tags "Feature" {
3028
[bool] $childrenCreated = $false
3129
while (-not $childrenCreated)
3230
{
33-
$childprocesses = Get-Process | Where-Object {$_.Name -like 'createchildproc'}
31+
$childprocesses = Get-Process | Where-Object {$_.Name -like 'createchildproc*'}
3432
if ($childprocesses.count -eq $numToCreate+1)
3533
{
3634
$childrenCreated = $true
@@ -47,7 +45,7 @@ Describe "Native Command Processor" -tags "Feature" {
4745
break
4846
}
4947
}
50-
$childprocesses = Get-Process | Where-Object {$_.Name -like 'createchildproc'}
48+
$childprocesses = Get-Process | Where-Object {$_.Name -like 'createchildproc*'}
5149
$count = $childprocesses.count
5250
$childprocesses | Stop-Process
5351
$count | Should Be 0

0 commit comments

Comments
 (0)