chproxy icon indicating copy to clipboard operation
chproxy copied to clipboard

improve proxy unit tests

Open mga-chka opened this issue 3 years ago • 3 comments

Description

This PR fix and improve unit test on proxy.go

Pull request type

Please check the type of change your PR introduces:

  • [x] Bugfix
  • [ ] Feature
  • [ ] Code style update (formatting, renaming)
  • [ ] Refactoring (no functional changes, no api changes)
  • [ ] Build related changes
  • [ ] Documentation content changes
  • [ ] Other (please describe):

Checklist

  • [x] Linter passes correctly
  • [ ] Add tests which fail without the change (if possible)
  • [x] All tests passing
  • [ ] Extended the README / documentation, if necessary

Does this introduce a breaking change?

  • [ ] Yes
  • [x] No

Further comments

mga-chka avatar Aug 11 '22 12:08 mga-chka

Your Render PR Server URL is https://chproxy-pr-203.onrender.com.

Follow its progress at https://dashboard.render.com/static/srv-cbqf7h02i3mj3e1k40bg.

render[bot] avatar Aug 11 '22 12:08 render[bot]

FYI I've run the ci on github actions a dozen of times and it failed only once on a unit test that is not linked to my modification (TestServe/http_cached_gzipped_deadline). The most instable test so far (TestReverseProxy_ServeHTTP1/queue_overflow_for_user) seems stable

mga-chka avatar Aug 11 '22 16:08 mga-chka

For future improvement to avoid this kind of complicated issues we should have a fake server handler scoped to each test case. Tests will be a bit longer, but I doubt it will be very impactful

gontarzpawel avatar Aug 12 '22 12:08 gontarzpawel