Rev 2828: Fix #140055 by properly closing test servers in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Mon Sep 17 21:54:30 BST 2007


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 2828
revision-id: pqm at pqm.ubuntu.com-20070917205427-yt8z43qj0756so3p
parent: pqm at pqm.ubuntu.com-20070917195855-edm9ckmelvhl05te
parent: v.ladeuil+lp at free.fr-20070917191610-xy0uo72xbyeeebbz
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2007-09-17 21:54:27 +0100
message:
  Fix #140055 by properly closing test servers
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/tests/HttpServer.py     httpserver.py-20061012142527-m1yxdj1xazsf8d7s-1
  bzrlib/transport/ftp.py        ftp.py-20051116161804-58dc9506548c2a53
    ------------------------------------------------------------
    revno: 2826.1.1
    merged: v.ladeuil+lp at free.fr-20070917191610-xy0uo72xbyeeebbz
    parent: pqm at pqm.ubuntu.com-20070917142923-f06edfgw1d0cvj4w
    parent: v.ladeuil+lp at free.fr-20070917181601-vlkwtrgze2mk5den
    committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
    branch nick: bzr.integration
    timestamp: Mon 2007-09-17 21:16:10 +0200
    message:
      Fix #140055 by properly closing test servers
    ------------------------------------------------------------
    revno: 2825.1.2
    merged: v.ladeuil+lp at free.fr-20070917181601-vlkwtrgze2mk5den
    parent: v.ladeuil+lp at free.fr-20070917154823-kbnjfgrhn0fihylk
    committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
    branch nick: 140055
    timestamp: Mon 2007-09-17 20:16:01 +0200
    message:
      Review feedback.
    ------------------------------------------------------------
    revno: 2825.1.1
    merged: 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 file 'NEWS'
--- a/NEWS	2007-09-17 12:46:56 +0000
+++ b/NEWS	2007-09-17 19:16:10 +0000
@@ -41,6 +41,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 18:16:01 +0000
@@ -586,8 +586,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