Intermittent TestHttpsConnection Failures to httpbin.org
Hiya!
We use a copy of go-httpclient in one of our internal applications, but occasionally see a weird test failure
=== RUN TestHttpsConnection
--- FAIL: TestHttpsConnection (3.00 seconds)
httpclient_test.go:93: 1st request failed - Get https://httpbin.org/ip: read tcp 23.21.162.118:443: use of closed network connection
=== RUN TestHttpClient
--- PASS: TestHttpClient (0.45 seconds)
=== RUN TestSlowServer
--- PASS: TestSlowServer (0.50 seconds)
=== RUN TestMultipleRequests
--- PASS: TestMultipleRequests (2.00 seconds)
FAIL
FAIL github.com/mreiferson/go-httpclient 5.965s
Have you seen this before, is it a known issue? :metal:
that test depends on an external service, unfortunately
@mreiferson would it be possible to use a snakeoil certificate and local loopback https listener which returns the ipaddress of the request instead of relying on an external service?
@fujin absolutely, if you're willing/interested in submitting a PR that would be awesome!
@mreiferson I shall do so. Do you have any preference for the snakeoil certs or shall I just generate a pair?
no preference, generating them sounds fine
Who the hell would write tests depending on external servers that we have no control of?!
ducks for cover