Skip to content

Commit

Permalink
Merge pull request #4590 from Microsoft/users/biprasad/fixRetryl0-3
Browse files Browse the repository at this point in the history
Fix powershell helper L0 tests
  • Loading branch information
bishal-pdMSFT authored Jun 20, 2017
2 parents 8860c84 + 0daf6f0 commit f2adfcc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function Test-RetryableException {
)

$AllowedExceptions | ForEach-Object {
if($_ -and ([type]$_).IsAssignableFrom($Exception.GetType()))
if($_ -and ($Exception -is ([type]$_)))
{
return $true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ Register-Mock Start-Sleep {}

# Act/Assert.
Assert-Throws {
& $module Invoke-ActionWithRetries -Action $action -RetryableExceptions @("System.IO.FileNotFoundException")
& $module Invoke-ActionWithRetries -Action $action -RetryableExceptions @("System.IO.IOException")
} -MessagePattern "File not found error!"
Assert-AreEqual 10 $global:retriesAttempted "Number of retries not correct"

0 comments on commit f2adfcc

Please sign in to comment.