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

Already on GitHub? Sign in to your account

test coverage for error paths #146

dominictarr opened this Issue Nov 4, 2011 · 5 comments


None yet
3 participants

dominictarr commented Nov 4, 2011

currently, there are tests for requests that should be proxied correctly,
but I do not see any tests that check that errors are handled correctly.

  • socket hangup (server proxied to dies part way)
  • econn refused (there is no server at host:port proxied to)
  • sockets closing part while proxy is writing (can make req.write throw)

those are the errors that I can think of off the top of my head, can anyone else think of any more?


dominictarr commented Nov 4, 2011

these need to be tested for both http and ws requests.


coderarity commented Mar 31, 2012

I think I can try to add a few test cases for errors, I'm not sure how you would test something like a socket hangup error though.


dominictarr commented Mar 31, 2012

it's simple, you just make a server that calls res.destroy() instead of writing a response.


coderarity commented Mar 31, 2012

Ok, cool, thanks.


jcrugzz commented Oct 30, 2015

Closing due to old age and relevance.

@jcrugzz jcrugzz closed this Oct 30, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment