Fixed logic error occuring at certain values 07/45307/14
authorlbuckuli <lbuckuli@cisco.com>
Tue, 20 Sep 2016 13:09:01 +0000 (13:09 +0000)
committerVratko Polák <vrpolak@cisco.com>
Fri, 23 Sep 2016 07:56:16 +0000 (07:56 +0000)
commit1a1f7e0788a9da41f16c3025d15a24df048050f0
tree58e0f2b2ef802653b3b47b87b26ec56b1a01fbbf
parent939e644c8593722bd490b283228e6656f86b5a66
Fixed logic error occuring at certain values

When the "Wait For Getter Error Or Safe Stateful Validator
Consecutive Success" keyword receives certain arguments, it
will crash with a "Logic error" because the calculated repeat
count will be less than 1 or even 2.

WaitUtilsTest.robot: a new test case Timeout_Hits_Off_By_One_Bug added.

In WaitUtils.robot for keywords:
Wait_For_Getter_And_Safe_Stateful_Validator_Consecutive_Success,

Wait_For_Getter_Error_Or_Safe_Stateful_Validator_Consecutive_Success
changed:
: FOR    ${try}    IN RANGE    1    ${maximum_tries}+1    # If maximum_tries is 3, for will go through 1, 2, and 3.
to
: FOR    ${try}    IN RANGE    1    ${maximum_sleeps}+2    # If maximum_sleeps is 2, for will go through 1, 2, and 3.

Change-Id: Ie924cbd22dad01abf0e3ab9d06c2843abfcfda86
Signed-off-by: Jozef Behran <jbehran@cisco.com>
Signed-off-by: lbuckuli <lbuckuli@cisco.com>
csit/libraries/WaitUtils.robot
csit/suites/test/libraries/WaitUtilsTest.robot