Skip to content

Commit

Permalink
Fix: resolve flaky integration tests for list*** api calls (#585)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomerHeber authored Feb 7, 2023
1 parent 6bb14ca commit 23f913b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions env0/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ func configureProvider(version string, p *schema.Provider) schema.ConfigureConte
return true
}

if r.StatusCode() == 200 && isIntegrationTest && r.String() == "[]" {
log.Printf("[INFO] Received an empty list for an integration test, retrying request: %s %s", r.Request.Method, r.Request.URL)
return true
}

return false
})

Expand Down

0 comments on commit 23f913b

Please sign in to comment.