From a877f6aa29f088c54a2ab5bcf0701ac69cfd1651 Mon Sep 17 00:00:00 2001 From: c3mb0 Date: Sun, 9 Oct 2016 21:27:52 +0300 Subject: [PATCH] remove client timeout for go 1.5.3 tests --- client_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client_test.go b/client_test.go index 9dc332e4..ee841810 100644 --- a/client_test.go +++ b/client_test.go @@ -249,9 +249,10 @@ func TestEnablePinging(t *testing.T) { client := apns.NewClient(certificate) client.Host = server.URL client.HTTPClient.Transport.(*http2.Transport).TLSClientConfig = transport.TLSClientConfig + client.HTTPClient = &http.Client{Transport: client.HTTPClient.Transport} drop, ok := client.EnablePinging(true) assert.Equal(t, true, ok) - var gotDropped int32 = 0 + var gotDropped int32 go func() { <-drop atomic.StoreInt32(&gotDropped, 1) @@ -277,9 +278,10 @@ func TestDisablePinging(t *testing.T) { client := apns.NewClient(certificate) client.Host = server.URL client.HTTPClient.Transport.(*http2.Transport).TLSClientConfig = transport.TLSClientConfig + client.HTTPClient = &http.Client{Transport: client.HTTPClient.Transport} drop, ok := client.EnablePinging(true) assert.Equal(t, true, ok) - var gotDropped int32 = 0 + var gotDropped int32 cleanUp := make(chan struct{}) go func() { select {