Add additional sleep to some tests to increase reliability

This commit is contained in:
Howard Wolosky 2020-07-22 08:28:28 -07:00
Родитель 92c4aa8b3a
Коммит 437ac1b464
1 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -610,6 +610,11 @@ try
Context 'Remove Repo projects' {
$project = New-GitHubProject -OwnerName $script:ownerName -RepositoryName $repo.name -ProjectName $defaultRepoProject -Description $defaultRepoProjectDesc
$null = Remove-GitHubProject -Project $project.id -Confirm:$false
# Despite using StateChangeDelaySeconds during tests, we still appear to need more time
# for projects to be removed before testing that they were properly deleted.
Start-Sleep -Seconds 5
It 'Project should be removed' {
{Get-GitHubProject -Project $project.id} | Should -Throw
}
@ -618,6 +623,11 @@ try
Context 'Remove Repo project via pipeline' {
$project = $repo | New-GitHubProject -ProjectName $defaultRepoProject -Description $defaultRepoProjectDesc
$project | Remove-GitHubProject -Force
# Despite using StateChangeDelaySeconds during tests, we still appear to need more time
# for projects to be removed before testing that they were properly deleted.
Start-Sleep -Seconds 5
It 'Project should be removed' {
{$project | Get-GitHubProject} | Should -Throw
}