Remove hardcode from heat service

Also create timeout was increased, and heat job will be more stable.

Change-Id: Ib569166830463b97e485024af5127a4005f5f530
This commit is contained in:
Sergey Skripnick 2016-04-04 11:50:03 +03:00
parent d8b4443fe7
commit acd13d104e
2 changed files with 7 additions and 4 deletions

View File

@ -11,11 +11,14 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import utils as common_utils
from rally.task import atomic
from rally.task import utils
CONF = cfg.CONF
class Stack(common_utils.RandomNameGeneratorMixin):
"""Represent heat stack.
@ -48,8 +51,8 @@ class Stack(common_utils.RandomNameGeneratorMixin):
def _wait(self, ready_statuses, failure_statuses):
self.stack = utils.wait_for_status(
self.stack,
check_interval=10,
timeout=1200,
check_interval=CONF.benchmark.heat_stack_create_poll_interval,
timeout=CONF.benchmark.heat_stack_create_timeout,
ready_statuses=ready_statuses,
failure_statuses=failure_statuses,
update_resource=utils.get_from_manager(),

View File

@ -48,10 +48,10 @@ class StackTestCase(test.ScenarioTestCase):
stack.stack = fake_stack = mock.Mock()
stack._wait(["ready_statuses"], ["failure_statuses"])
mock_utils.wait_for_status.assert_called_once_with(
fake_stack, check_interval=10,
fake_stack, check_interval=1.0,
ready_statuses=["ready_statuses"],
failure_statuses=["failure_statuses"],
timeout=1200,
timeout=3600.0,
update_resource=mock_utils.get_from_manager())
@mock.patch("rally.task.atomic")