~bzr-pqm/bzr/bzr.dev

Viewing all changes in revision 4731.2.3.

  • Committer: Vincent Ladeuil
  • Date: 2009-10-07 14:55:54 UTC
  • mto: (5247.1.1 first-try)
  • mto: This revision was merged to the branch mainline in revision 5396.
  • Revision ID: v.ladeuil+lp@free.fr-20091007145554-j0njl74ji5o5v6cx
Reduce the leaking http tests from ~200 to ~5.

* bzrlib/tests/test_http.py:
(WallRequestHandler._handle_one_request,
PredefinedRequestHandler._handle_one_request): Be sure to use the
proper wrapper to catch socket errors. This becomes more important
when threaded servers are used and now properly shut down.

* bzrlib/tests/http_server.py:
(TestingHTTPRequestHandler.handle_one_request): Use a wrapper
around the desired processing to share the socket errors handling.
(TestingHTTPServerMixin.shutdown_client): Helper to
(TestingThreadingHTTPServer): Collect clients and shut them down
properly.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: