Rev 6179: Add more checks that the server closes the connection properly. in http://bazaar.launchpad.net/~jameinel/bzr/2.5-no-hanging-teardown

John Arbash Meinel john at arbash-meinel.com
Mon Oct 3 07:11:34 UTC 2011


At http://bazaar.launchpad.net/~jameinel/bzr/2.5-no-hanging-teardown

------------------------------------------------------------
revno: 6179
revision-id: john at arbash-meinel.com-20111003071117-bbysp7zj0l5ow9mi
parent: john at arbash-meinel.com-20111003070931-bhgouo56lw5j8fcu
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.5-no-hanging-teardown
timestamp: Mon 2011-10-03 09:11:17 +0200
message:
  Add more checks that the server closes the connection properly.
-------------- next part --------------
=== modified file 'bzrlib/tests/test_test_server.py'
--- a/bzrlib/tests/test_test_server.py	2011-10-03 07:09:31 +0000
+++ b/bzrlib/tests/test_test_server.py	2011-10-03 07:11:17 +0000
@@ -205,6 +205,7 @@
         client.connect((server.host, server.port))
         client.write('ping\n')
         sync.wait()
+        self.assertEqual('', client.read()) # connection closed
         self.assertRaises(FailToRespond, server.pending_exception)
 
     def test_exception_swallowed_while_serving(self):
@@ -230,6 +231,7 @@
         client.connect((server.host, server.port))
         # Wait for the exception to propagate.
         sync.wait()
+        self.assertEqual('', client.read()) # connection closed
         # The connection wasn't served properly but the exception should have
         # been swallowed.
         server.pending_exception()



More information about the bazaar-commits mailing list