Rev 2826: Fix #140055 by properly closing the http and ftp test servers. in file:///v/home/vila/src/bugs/140055/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Mon Sep 17 16:48:25 BST 2007
At file:///v/home/vila/src/bugs/140055/
------------------------------------------------------------
revno: 2826
revision-id: v.ladeuil+lp at free.fr-20070917154823-kbnjfgrhn0fihylk
parent: pqm at pqm.ubuntu.com-20070917005035-cshdkpzbj63id1uw
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 140055
timestamp: Mon 2007-09-17 17:48:23 +0200
message:
Fix #140055 by properly closing the http and ftp test servers.
* bzrlib/tests/HttpServer.py:
(HttpServer.tearDown): Closing server will close the listening
socket.
* bzrlib/transport/ftp.py:
(FtpServer.tearDown): Closing server will close both the listening
socket and the data channel.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/tests/HttpServer.py httpserver.py-20061012142527-m1yxdj1xazsf8d7s-1
bzrlib/transport/ftp.py ftp.py-20051116161804-58dc9506548c2a53
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS 2007-09-16 19:29:00 +0000
+++ b/NEWS 2007-09-17 15:48:23 +0000
@@ -39,6 +39,10 @@
longer throws away the profiling data if this command is run with
``--lsprof-file callgrind.out.ci`` say. (Ian Clatworthy)
+ * HttpServer and FtpServer need to be closed properly or a listening socket
+ will remain opened.
+ (Vincent Ladeuil, #140055)
+
API BREAKS:
* The ``VersionedFile`` interface now allows content checks to be bypassed
=== modified file 'bzrlib/tests/HttpServer.py'
--- a/bzrlib/tests/HttpServer.py 2007-04-21 21:31:32 +0000
+++ b/bzrlib/tests/HttpServer.py 2007-09-17 15:48:23 +0000
@@ -380,6 +380,7 @@
def tearDown(self):
"""See bzrlib.transport.Server.tearDown."""
+ self._httpd.server_close()
self._http_running = False
self._http_thread.join()
=== modified file 'bzrlib/transport/ftp.py'
--- a/bzrlib/transport/ftp.py 2007-09-05 13:38:20 +0000
+++ b/bzrlib/transport/ftp.py 2007-09-17 15:48:23 +0000
@@ -587,7 +587,7 @@
def tearDown(self):
"""See bzrlib.transport.Server.tearDown."""
# have asyncore release the channel
- self._ftp_server.del_channel()
+ self._ftp_server.close()
asyncore.close_all()
self._async_thread.join()
More information about the bazaar-commits
mailing list