Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent TestHttpsConnection Failures to httpbin.org #19

Open
fujin opened this issue Sep 5, 2014 · 6 comments
Open

Intermittent TestHttpsConnection Failures to httpbin.org #19

fujin opened this issue Sep 5, 2014 · 6 comments

Comments

@fujin
Copy link

fujin commented Sep 5, 2014

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? 🤘

@fujin fujin changed the title Occasional Test Failures Intermittent TestHttpsConnection Failures to httpbin.org Sep 5, 2014
@mreiferson
Copy link
Owner

that test depends on an external service, unfortunately

@fujin
Copy link
Author

fujin commented Sep 10, 2014

@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?

@mreiferson
Copy link
Owner

@fujin absolutely, if you're willing/interested in submitting a PR that would be awesome!

@fujin
Copy link
Author

fujin commented Sep 10, 2014

@mreiferson I shall do so. Do you have any preference for the snakeoil certs or shall I just generate a pair?

@mreiferson
Copy link
Owner

no preference, generating them sounds fine

@mynameisfiber
Copy link
Collaborator

Who the hell would write tests depending on external servers that we have no control of?!

ducks for cover

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants