Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
Fix linting error
Browse files Browse the repository at this point in the history
  • Loading branch information
RicePatrick committed Aug 19, 2024
1 parent 3e0d895 commit 07b7c25
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gitlab_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,12 +442,15 @@ func TestExponentialBackoffLogic(t *testing.T) {

// Send a request (which will get a bunch of 429s)
// None of the responses matter, so ignore them all
_, _, _ = client.Projects.GetProject(1, nil)
_, resp, _ := client.Projects.GetProject(1, nil)
end := time.Now()

// The test should run for _at least_ 3,200 milliseconds
duration := float64(end.Sub(start))
if duration < float64(3200*time.Millisecond) {
t.Fatal("Wait was shorter than expected. Expected a minimum of 5 retries taking 3200 milliseconds, got:", duration)
}
if resp.StatusCode != 429 {
t.Fatal("Expected to get a 429 code given the server is hard-coded to return this. Received instead:", resp.StatusCode)
}
}

0 comments on commit 07b7c25

Please sign in to comment.