From e094ea5b2161c42b1be8adce1d827551066d38a8 Mon Sep 17 00:00:00 2001 From: "Alexey Lavrenuke (load testing)" Date: Fri, 20 Sep 2013 14:32:04 +0400 Subject: [PATCH] add one last step to load plan and fix #40 --- Tank/stepper/load_plan.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tank/stepper/load_plan.py b/Tank/stepper/load_plan.py index 30f6303..de4ee4d 100644 --- a/Tank/stepper/load_plan.py +++ b/Tank/stepper/load_plan.py @@ -135,6 +135,8 @@ class Stairway(Composite): Const(minrps + i * increment, duration) for i in xrange(0, n_steps + 1) ] + if (n_steps + 1) * increment < maxrps: + steps.append(Const(maxrps, duration)) logging.info(steps) super(Stairway, self).__init__(steps) @@ -211,7 +213,6 @@ def create(rps_schedule): >>> take(10, create(['const(1, 1)'])) [0] - >>> take(10, create(['step(100,950,100,1m)'])) ''' if len(rps_schedule) > 1: lp = Composite([StepFactory.produce(step_config)