Skip to content

Commit

Permalink
push_test.go: properly close the created httptest.Server after every …
Browse files Browse the repository at this point in the history
…test call
  • Loading branch information
valyala committed Dec 18, 2023
1 parent de71953 commit b969517
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions push_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ func TestInitPushWithOptions(t *testing.T) {
firstRequest = false
}
}))
defer srv.Close()
ctx, cancel := context.WithCancel(context.Background())
if err := s.InitPushWithOptions(ctx, srv.URL, time.Millisecond, opts); err != nil {
t.Fatalf("unexpected error: %s", err)
Expand Down

0 comments on commit b969517

Please sign in to comment.