Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add a test for the powershell hang fix#5451

Merged
daxian-dbw merged 3 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
daxian-dbw:hangfixtestdaxian-dbw/PowerShell:hangfixtestCopy head branch name to clipboard
Nov 15, 2017
Merged

Add a test for the powershell hang fix#5451
daxian-dbw merged 3 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
daxian-dbw:hangfixtestdaxian-dbw/PowerShell:hangfixtestCopy head branch name to clipboard

Conversation

@daxian-dbw

Copy link
Copy Markdown
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
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

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

@iSazonov iSazonov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Leave a comment

@PaulHigin PaulHigin left a comment

Copy link
Copy Markdown
Contributor

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.