Rev 5428: (spiv) Fix random test_bad_connection_ssh failures (Vincent Ladeuil) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Thu Sep 16 05:26:25 BST 2010
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 5428 [merge]
revision-id: pqm at pqm.ubuntu.com-20100916042623-g4puxjwcv8lg2c5d
parent: pqm at pqm.ubuntu.com-20100915223323-wdun3rsvmw8bfu5a
parent: v.ladeuil+lp at free.fr-20100915101022-6735yj2z0b70vqvb
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2010-09-16 05:26:23 +0100
message:
(spiv) Fix random test_bad_connection_ssh failures (Vincent Ladeuil)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/transport/ssh.py ssh.py-20060824042150-0s9787kng6zv1nwq-1
=== modified file 'NEWS'
--- a/NEWS 2010-09-14 09:29:57 +0000
+++ b/NEWS 2010-09-15 10:10:22 +0000
@@ -286,6 +286,10 @@
Testing
*******
+* Catch socket errors to avoid
+ bt.test_sftp_transport.SSHVendorBadConnection.test_bad_connection_ssh
+ random failures. (Vincent Ladeuil, #601804)
+
* HTTP test servers will leak less threads (and sockets) and will not hang on
AIX anymore. (Vincent Ladeuil, #405745)
=== modified file 'bzrlib/transport/ssh.py'
--- a/bzrlib/transport/ssh.py 2010-09-09 07:31:02 +0000
+++ b/bzrlib/transport/ssh.py 2010-09-15 10:10:22 +0000
@@ -377,7 +377,7 @@
return SFTPClient(SocketAsChannelAdapter(sock))
except _sftp_connection_errors, e:
self._raise_connection_error(host, port=port, orig_error=e)
- except (OSError, IOError), e:
+ except (OSError, IOError, socket.error), e:
# If the machine is fast enough, ssh can actually exit
# before we try and send it the sftp request, which
# raises a Broken Pipe
@@ -392,7 +392,7 @@
return self._connect(argv)
except (EOFError), e:
self._raise_connection_error(host, port=port, orig_error=e)
- except (OSError, IOError), e:
+ except (OSError, IOError, socket.error), e:
# If the machine is fast enough, ssh can actually exit
# before we try and send it the sftp request, which
# raises a Broken Pipe
More information about the bazaar-commits
mailing list