From 82de5e31753a0481c8771a69a615a7e8a8421d45 Mon Sep 17 00:00:00 2001 From: Steve Heyman Date: Mon, 21 Mar 2016 14:15:33 -0500 Subject: [PATCH] Add a configurable setting in barbican-functional.conf for timeouts When debugging API calls, you often timeout because of breakpoints. The default value is 10 seconds which isn't long enough for debugging. This CR makes that setting configurable in barbican-functional.conf and retains the default of 10 seconds. Change-Id: I51685d5df903088773cba4ca624bbd0360ed0d16 --- etc/barbican/barbican-functional.conf | 3 +++ functionaltests/common/client.py | 2 +- functionaltests/common/config.py | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/etc/barbican/barbican-functional.conf b/etc/barbican/barbican-functional.conf index 16afa46a4..4f9295b84 100644 --- a/etc/barbican/barbican-functional.conf +++ b/etc/barbican/barbican-functional.conf @@ -49,6 +49,9 @@ auditor_b_password=barbican #region_name=RegionOne #endpoint_type=public +# use this to increase the timeout (in seconds) when debugging API calls +#timeout=10 + # use this to run the functional tests against a # different barbican server than the one that is # specified in the service catalog. To use what is diff --git a/functionaltests/common/client.py b/functionaltests/common/client.py index bdfb6a038..c31da5004 100644 --- a/functionaltests/common/client.py +++ b/functionaltests/common/client.py @@ -31,7 +31,7 @@ CONF = config.get_config() class BarbicanClient(object): def __init__(self, api_version='v1'): - self.timeout = 10 + self.timeout = CONF.keymanager.timeout self.api_version = api_version self.default_headers = { 'Content-Type': 'application/json', diff --git a/functionaltests/common/config.py b/functionaltests/common/config.py index b8cffa0d3..d6ad70c4b 100644 --- a/functionaltests/common/config.py +++ b/functionaltests/common/config.py @@ -70,6 +70,7 @@ def setup_config(config_file=''): cfg.StrOpt('service_name', default='barbican'), cfg.StrOpt('region_name', default='RegionOne'), cfg.StrOpt('endpoint_type', default='public'), + cfg.IntOpt('timeout', default=10), cfg.StrOpt('override_url', default=''), cfg.StrOpt('override_url_version', default='') ]