Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix TestClientOnResponseError parallel tests #710

Merged
merged 1 commit into from Sep 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions client_test.go
Expand Up @@ -780,9 +780,6 @@ func TestNewWithLocalAddr(t *testing.T) {
}

func TestClientOnResponseError(t *testing.T) {
ts := createAuthServer(t)
defer ts.Close()

tests := []struct {
name string
setup func(*Client)
Expand Down Expand Up @@ -862,8 +859,12 @@ func TestClientOnResponseError(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
t.Parallel()
ts := createAuthServer(t)
defer ts.Close()

var assertErrorHook = func(r *Request, err error) {
assertNotNil(t, r)
v, ok := err.(*ResponseError)
Expand Down