Skip to content

Commit 437ac1b

Browse files
committed
Add additional sleep to some tests to increase reliability
1 parent 92c4aa8 commit 437ac1b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Tests/GitHubProjects.tests.ps1

+10
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,11 @@ try
610610
Context 'Remove Repo projects' {
611611
$project = New-GitHubProject -OwnerName $script:ownerName -RepositoryName $repo.name -ProjectName $defaultRepoProject -Description $defaultRepoProjectDesc
612612
$null = Remove-GitHubProject -Project $project.id -Confirm:$false
613+
614+
# Despite using StateChangeDelaySeconds during tests, we still appear to need more time
615+
# for projects to be removed before testing that they were properly deleted.
616+
Start-Sleep -Seconds 5
617+
613618
It 'Project should be removed' {
614619
{Get-GitHubProject -Project $project.id} | Should -Throw
615620
}
@@ -618,6 +623,11 @@ try
618623
Context 'Remove Repo project via pipeline' {
619624
$project = $repo | New-GitHubProject -ProjectName $defaultRepoProject -Description $defaultRepoProjectDesc
620625
$project | Remove-GitHubProject -Force
626+
627+
# Despite using StateChangeDelaySeconds during tests, we still appear to need more time
628+
# for projects to be removed before testing that they were properly deleted.
629+
Start-Sleep -Seconds 5
630+
621631
It 'Project should be removed' {
622632
{$project | Get-GitHubProject} | Should -Throw
623633
}

0 commit comments

Comments
 (0)