From a67c0ca7030362c35ea8dd183229bc73173cf60b Mon Sep 17 00:00:00 2001 From: Amrith Kumar Date: Thu, 2 Oct 2014 08:19:38 -0400 Subject: [PATCH] Increase test rate limit to avoid rate limit error The current rate limit is 200 requests per minute. I'm getting consistent tox failures as the machine is exceeding this rate. The fix impacts only test code and adjusts the limit and a test that has a hard-coded reference to the old limit. Why 500 you may ask? Because 600 worked and 450 failed consistently with the rate limit error. In addition, the change addresses the fact that some test configuration values are duplicated in the test; the change makes the test reference the configuration value. Change-Id: I4bb290d8de6253d65b7877c743bb288ee2bce536 Closes-Bug: #1376689 Closes-Bug: #1378932 --- etc/trove/trove.conf.test | 8 ++++---- trove/tests/api/limits.py | 12 ++++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/etc/trove/trove.conf.test b/etc/trove/trove.conf.test index 58bc8d82a0..5f67fbffde 100644 --- a/etc/trove/trove.conf.test +++ b/etc/trove/trove.conf.test @@ -90,10 +90,10 @@ max_backups_per_user = 5 volume_time_out=30 # Config options for rate limits -http_get_rate = 200 -http_post_rate = 200 -http_put_rate = 200 -http_delete_rate = 200 +http_get_rate = 500 +http_post_rate = 500 +http_put_rate = 500 +http_delete_rate = 500 # default datastore default_datastore = a00000a0-00a0-0a00-00a0-000a000000aa diff --git a/trove/tests/api/limits.py b/trove/tests/api/limits.py index 8a8ec66b07..db48c46124 100644 --- a/trove/tests/api/limits.py +++ b/trove/tests/api/limits.py @@ -22,6 +22,7 @@ from nose.tools import assert_true from proboscis import before_class from proboscis import test +from trove.common import cfg from trove.openstack.common import timeutils from trove.tests.util import create_dbaas_client from troveclient.compat import exceptions @@ -29,11 +30,14 @@ from datetime import datetime from trove.tests.util.users import Users from trove.tests.fakes import limits as fake_limits + +CONF = cfg.CONF + GROUP = "dbaas.api.limits" -DEFAULT_RATE = 200 -DEFAULT_MAX_VOLUMES = 100 -DEFAULT_MAX_INSTANCES = 55 -DEFAULT_MAX_BACKUPS = 5 +DEFAULT_RATE = CONF.http_get_rate +DEFAULT_MAX_VOLUMES = CONF.max_volumes_per_user +DEFAULT_MAX_INSTANCES = CONF.max_instances_per_user +DEFAULT_MAX_BACKUPS = CONF.max_backups_per_user def ensure_limits_are_not_faked(func):