Skip to content

Commit

Permalink
Flaky test.
Browse files Browse the repository at this point in the history
  • Loading branch information
splatteredbits committed Feb 6, 2021
1 parent 6275e38 commit 4a2bb8b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Tests/Install-CCertificate.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,17 @@ function ThenCertificateInstalled
$In = 'My'
)

$cert = Get-CCertificate -Thumbprint $WithThumbprint -StoreLocation $For -StoreName $In
$tries = 100
$cert = $null
for( $tryNum = 0; $tryNum -lt $tries; ++$tryNum )
{
$cert = Get-CCertificate -Thumbprint $WithThumbprint -StoreLocation $For -StoreName $In
if( $cert )
{
break
}
Start-Sleep -Milliseconds 100
}
$cert | Should -Not -BeNullOrEmpty
$cert.Thumbprint | Should -Be $WithThumbprint
}
Expand Down

0 comments on commit 4a2bb8b

Please sign in to comment.