Rev 2372: Review feedback. in file:///home/robertc/source/baz/hpss-hooks/
Robert Collins
robertc at robertcollins.net
Tue Mar 27 03:42:06 BST 2007
At file:///home/robertc/source/baz/hpss-hooks/
------------------------------------------------------------
revno: 2372
revision-id: robertc at robertcollins.net-20070327024201-ntm3ek1rrkkmg2yd
parent: robertc at robertcollins.net-20070325085956-my8jv7cifqzyltyz
committer: Robert Collins <robertc at robertcollins.net>
branch nick: hpss-hooks
timestamp: Tue 2007-03-27 12:42:01 +1000
message:
Review feedback.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/tests/test_smart_transport.py test_ssh_transport.py-20060608202016-c25gvf1ob7ypbus6-2
=== modified file 'NEWS'
--- a/NEWS 2007-03-25 08:59:56 +0000
+++ b/NEWS 2007-03-27 02:42:01 +0000
@@ -7,13 +7,13 @@
plugins to execute code upon server startup and shutdown.
(Robert Collins).
- * SmartServer in standalone mode will now close its listening socket
- when it stops, rather than waiting for garbage collection. This primarily
- fixes test suite hangs when a test tries to connect to a shutdown server.
- It may also help improve behaviour when dealing with a server running
- on a specific port (rather than dynamically assigned ports).
- (Robert Collins)
-
+ * SmartServer in standalone mode will now close its listening socket
+ when it stops, rather than waiting for garbage collection. This primarily
+ fixes test suite hangs when a test tries to connect to a shutdown server.
+ It may also help improve behaviour when dealing with a server running
+ on a specific port (rather than dynamically assigned ports).
+ (Robert Collins)
+
bzr 0.15 (not finalised)
=== modified file 'bzrlib/tests/test_smart_transport.py'
--- a/bzrlib/tests/test_smart_transport.py 2007-03-25 08:59:56 +0000
+++ b/bzrlib/tests/test_smart_transport.py 2007-03-27 02:42:01 +0000
@@ -822,14 +822,14 @@
class TestServerSocketUsage(SmartTCPTests):
def test_server_closes_listening_sock_on_shutdown(self):
- """The server should close its listening socket when its stopped."""
+ """The server should close its listening socket when it's stopped."""
self.setUpServer()
- # clean up the server and initial transport (which wont have connected)
- server = self.server
+ # clean up the server and initial transport (which wont have connected):
# force a connection, which uses the listening socket to synchronise
# with the server thread, so that when we shut it down it has already
# executed the 'self._should_terminate = False' line in the server
# method.
+ server = self.server
self.transport.has('.')
self.tearDownServer()
# make a new connection to break out the inner loop in the server.
@@ -838,6 +838,8 @@
transport.has('.')
# and close it.
transport.disconnect()
+ # this del probably is not needed, but I wanted to be clear about what
+ # we are testing: having objects hanging around is not part of the test.
del transport
while server._server_thread.isAlive():
# this is fugly: we should have an event for the server we can
More information about the bazaar-commits
mailing list