Skip to content

Conversation

@daxian-dbw
Copy link
Member

Add test for the fix in PR #5356
Also add a minor change to build.psm1 to ignore the 'Sync-PSTags' warning.

exit
'@
$process = Start-Process pwsh -ArgumentList $command -PassThru
for ($i = 0; -not $process.HasExited -and $i -lt 5; $i++) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I will use Wait-UntilTrue

Start-Sleep -Seconds 1
}

$expect = "powershell process exits in 5 seconds"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the verification be like:

$process.HasExited | Should Be $true
Stop-Process $process -ErrorAction SilentlyContinue

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Should be $true check will not generate a useful error message when it fails, so I prefer to the current check. But I will add -ErrorAction SilentlyContinue

@daxian-dbw
Copy link
Member Author

@adityapatwardhan Your comments are addressed. Please take another look. Thanks!

Copy link
Collaborator

@iSazonov iSazonov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leave a comment

Copy link
Contributor

@PaulHigin PaulHigin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@daxian-dbw daxian-dbw merged commit c4f0d1c into PowerShell:master Nov 15, 2017
@daxian-dbw daxian-dbw deleted the hangfixtest branch November 15, 2017 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants