Rev 6191: Change the testing client timeout to something that should always be longer than any non-hung test. in http://bazaar.launchpad.net/~jameinel/bzr/2.5-longer-timeout

John Arbash Meinel john at arbash-meinel.com
Wed Oct 5 14:54:53 UTC 2011


At http://bazaar.launchpad.net/~jameinel/bzr/2.5-longer-timeout

------------------------------------------------------------
revno: 6191
revision-id: john at arbash-meinel.com-20111005145439-oht8dh0brzhg3lra
parent: pqm at pqm.ubuntu.com-20111004230324-1fehahzm5jndg6rw
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.5-longer-timeout
timestamp: Wed 2011-10-05 16:54:39 +0200
message:
  Change the testing client timeout to something that should always be longer than any non-hung test.
  
  Change the fast-poll to be a bit faster.
-------------- next part --------------
=== modified file 'bzrlib/tests/test_server.py'
--- a/bzrlib/tests/test_server.py	2011-10-03 14:15:44 +0000
+++ b/bzrlib/tests/test_server.py	2011-10-05 14:54:39 +0000
@@ -602,6 +602,9 @@
             self, request, server.backing_transport,
             server.root_client_path,
             timeout=_DEFAULT_TESTING_CLIENT_TIMEOUT)
+        # Override the default _client_poll_timeout, this way we quickly detect
+        # when we are requested to stop as part of stop_server().
+        self._client_poll_timeout = 0.1
         request.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
         SocketServer.BaseRequestHandler.__init__(self, request, client_address,
                                                  server)
@@ -616,7 +619,7 @@
             return
 
 
-_DEFAULT_TESTING_CLIENT_TIMEOUT = 4.0
+_DEFAULT_TESTING_CLIENT_TIMEOUT = 60.0
 
 class TestingSmartServer(TestingThreadingTCPServer, server.SmartTCPServer):
 



More information about the bazaar-commits mailing list