You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2015/01/28 05:37:20 UTC
[42/50] trafficserver-qa git commit: Fix timeout problems with
traffic_manager
Fix timeout problems with traffic_manager
Project: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/commit/9e8a082a
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/tree/9e8a082a
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/diff/9e8a082a
Branch: refs/heads/master
Commit: 9e8a082ad1ddecfaf535f17e821256924467c9ee
Parents: 80b147a
Author: Thomas Jackson <ja...@gmail.com>
Authored: Thu Jan 22 17:07:05 2015 -0800
Committer: Thomas Jackson <ja...@gmail.com>
Committed: Thu Jan 22 17:07:05 2015 -0800
----------------------------------------------------------------------
tsqa/environment.py | 6 +++++-
tsqa/utils.py | 8 +++++---
2 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver-qa/blob/9e8a082a/tsqa/environment.py
----------------------------------------------------------------------
diff --git a/tsqa/environment.py b/tsqa/environment.py
index c2d16cf..1d6e474 100644
--- a/tsqa/environment.py
+++ b/tsqa/environment.py
@@ -322,7 +322,7 @@ class Environment:
admin_port = tsqa.utils.bind_unused_port()[1]
self.hostports = [('127.0.0.1', http_server_port),
- #('127.0.0.1', manager_mgmt_port), # TODO: fix this
+ ('127.0.0.1', manager_mgmt_port),
('127.0.0.1', admin_port),
]
@@ -340,6 +340,10 @@ class Environment:
'proxy.config.admin.autoconf_port': admin_port,
'proxy.config.diags.show_location': 1,
'proxy.config.admin.user_id': '#-1',
+
+ # set the process_server timeouts to 0 (faster startup)
+ 'proxy.config.lm.pserver_timeout_secs': 0,
+ 'proxy.config.lm.pserver_timeout_msecs': 0,
})
records.write()
http://git-wip-us.apache.org/repos/asf/trafficserver-qa/blob/9e8a082a/tsqa/utils.py
----------------------------------------------------------------------
diff --git a/tsqa/utils.py b/tsqa/utils.py
index 4f63a2a..0baaca9 100644
--- a/tsqa/utils.py
+++ b/tsqa/utils.py
@@ -18,7 +18,7 @@ def poll_interfaces(hostports, **kwargs):
'''
connect_timeout_sec = 1
- poll_sleep_sec = 1
+ poll_sleep_sec = 0.1
if kwargs.has_key('timeout_sec'):
timeout = time.time() + kwargs['timeout_sec']
@@ -35,9 +35,11 @@ def poll_interfaces(hostports, **kwargs):
log.debug("Checking interface '%s:%d'", hostname, port)
# This supports IPv6
-
try:
- s = socket.create_connection((hostname, port), timeout=connect_timeout_sec)
+ s = socket.create_connection((hostname, port),
+ timeout=connect_timeout_sec,
+ source_address=('127.0.0.1', 0), # force the request to come from loopback
+ )
s.close()
hostports.remove(hostport)