Rev 5402: Explain the wait timeouts, etc. in http://bazaar.launchpad.net/~jameinel/bzr/2.3-bzr-connect-ssh

John Arbash Meinel john at arbash-meinel.com
Wed Sep 1 19:41:38 BST 2010


At http://bazaar.launchpad.net/~jameinel/bzr/2.3-bzr-connect-ssh

------------------------------------------------------------
revno: 5402
revision-id: john at arbash-meinel.com-20100901184131-nlr61r0wroe8qrko
parent: john at arbash-meinel.com-20100901183726-gouh6wu8qtopwxwv
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.3-bzr-connect-ssh
timestamp: Wed 2010-09-01 13:41:31 -0500
message:
  Explain the wait timeouts, etc.
-------------- next part --------------
=== modified file 'bzrlib/tests/stub_sftp.py'
--- a/bzrlib/tests/stub_sftp.py	2010-09-01 18:37:26 +0000
+++ b/bzrlib/tests/stub_sftp.py	2010-09-01 18:41:31 +0000
@@ -373,8 +373,11 @@
         server = tcs._server_interface(tcs)
         # This blocks until the key exchange has been done
         ssh_server.start_server(None, server)
-        # Continue blocking until the run() loop has completed
-        end_time = time.time() + 1.0
+        # Continue blocking until the run() loop has completed, this sets an
+        # upper bound on how long a test can take, but 5s is pretty long, and
+        # we don't really want to wait forever in case there really was a
+        # problem.
+        end_time = time.time() + 5.0
         do_join = True
         while True:
             ssh_server.stopped_event.wait(0.1)



More information about the bazaar-commits mailing list