Rev 6178: Restrict the socket errors we will suppress. in http://bazaar.launchpad.net/~jameinel/bzr/2.5-no-hanging-teardown
John Arbash Meinel
john at arbash-meinel.com
Mon Oct 3 07:09:49 UTC 2011
At http://bazaar.launchpad.net/~jameinel/bzr/2.5-no-hanging-teardown
------------------------------------------------------------
revno: 6178
revision-id: john at arbash-meinel.com-20111003070931-bhgouo56lw5j8fcu
parent: john at arbash-meinel.com-20111003070653-bbh7nkafs1r7ygjw
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.5-no-hanging-teardown
timestamp: Mon 2011-10-03 09:09:31 +0200
message:
Restrict the socket errors we will suppress.
-------------- next part --------------
=== modified file 'bzrlib/tests/test_test_server.py'
--- a/bzrlib/tests/test_test_server.py 2011-10-03 07:06:53 +0000
+++ b/bzrlib/tests/test_test_server.py 2011-10-03 07:09:31 +0000
@@ -177,7 +177,12 @@
try:
self.assertEqual('', client.read())
except socket.error, e:
- pass
+ # On Windows, failing during 'handle' means we get
+ # 'forced-close-of-connection'. Possibly because we haven't
+ # processed the write request before we close the socket.
+ WSAECONNRESET = 10054
+ if e.errno in (WSAECONNRESET,):
+ pass
# Now the server has raised the exception in its own thread
self.assertRaises(CantConnect, server.stop_server)
More information about the bazaar-commits
mailing list