Fix Reconnect test

This commit is contained in:
James Mills 2022-04-02 14:19:17 +10:00
parent f51416382c
commit 4bbe613486
No known key found for this signature in database
GPG Key ID: AC4C014F1440EBD6

View File

@ -220,7 +220,6 @@ func TestServeHTTPSubscriberReconnect(t *testing.T) {
mb := New(nil)
s := httptest.NewServer(mb)
defer s.Close()
msgs := make(chan *Message)
ready := make(chan bool, 1)
@ -244,6 +243,10 @@ func TestServeHTTPSubscriberReconnect(t *testing.T) {
<-ready
s.Close()
s = httptest.NewServer(mb)
defer s.Close()
c := s.Client()
b := bytes.NewBufferString("hello world")
r, err := c.Post(s.URL+"/hello", "text/plain", b)