-
Committer:
Vincent Ladeuil
-
Date:
2009-10-08 14:34:02 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-20091008143402-b4uivhhkykn95u8v
Collect and shutdown clients for SmartTCPServer_for_testing.
* bzrlib/tests/http_server.py:
(TestingHTTPServerMixin.serve): Try to avoid hanging in the server
thread, we already catch the socket.timeout exception, we may as
well use it.
(TestingThreadingHTTPServer.process_request_thread): Get rid of
the spurious pdb.set_trace().
* bzrlib/tests/__init__.py:
(ExtendedTestResult.stopTestRun): Display how many threads are
left at the end.
(TestCase._check_leaked_threads):
* bzrlib/smart/server.py:
(SmartTCPServer.serve_conn): Return the created thread so daughter
classes can play with it.
(SmartTCPServer_for_testing.serve_conn): Collect the client
sockets/threads.
(SmartTCPServer_for_testing.shutdown_client): shutdown a client
socket.
(SmartTCPServer_for_testing.tearDown): shutdown client
sockets/threads.