Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
mgyucht committed Nov 30, 2023
1 parent 776d4bb commit 870eac1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions httpclient/api_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"fmt"
"io"
"net/http"
"net/url"
"os"
"strings"
"testing"
Expand Down Expand Up @@ -121,18 +120,15 @@ func TestSimpleRequestRetried(t *testing.T) {
Transport: hc(func(r *http.Request) (*http.Response, error) {
if !retried[0] {
retried[0] = true
return nil, &url.Error{
Op: "open",
URL: "/a/b",
Err: fmt.Errorf("connection refused"),
}
return nil, fmt.Errorf("connection refused")
}
return &http.Response{
StatusCode: 200,
Body: io.NopCloser(strings.NewReader(`{"foo": 2}`)),
Request: r,
}, nil
}),
TransientErrors: []string{"connection refused"},
})
var resp Dummy
err := c.Do(context.Background(), "PATCH", "/a",
Expand Down

0 comments on commit 870eac1

Please sign in to comment.