push_test.go: properly close the created httptest.Server after every test call
This commit is contained in:
parent
de719538d1
commit
b96951708c
@ -89,6 +89,7 @@ func TestInitPushWithOptions(t *testing.T) {
|
|||||||
firstRequest = false
|
firstRequest = false
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
|
defer srv.Close()
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
if err := s.InitPushWithOptions(ctx, srv.URL, time.Millisecond, opts); err != nil {
|
if err := s.InitPushWithOptions(ctx, srv.URL, time.Millisecond, opts); err != nil {
|
||||||
t.Fatalf("unexpected error: %s", err)
|
t.Fatalf("unexpected error: %s", err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user