Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Item14138: Add some retries to "Random" SSP tests
For "Random" functions, the code verifies that CALC and CALCULATE return
different results.  But occasionally a random function will return the
same value.  So retry it up to 5 times before failing.
  • Loading branch information
gac410 committed Aug 9, 2017
1 parent 27d756b commit 96c6f1b
Showing 1 changed file with 7 additions and 0 deletions.
Expand Up @@ -89,6 +89,13 @@ sub CALC {
my $rsltR = Foswiki::Func::expandCommonVariables($calcR);

if ($ne) {
my $i = 1;
while ( $rsltC eq $rsltR ) {
$rsltR = Foswiki::Func::expandCommonVariables($calcR);
print STDERR "RETRY For NE\n";
$i++;
last if ( $i == 5 );
}
$this->assert_str_not_equals( $rsltC, $rsltR );
}
else {
Expand Down

0 comments on commit 96c6f1b

Please sign in to comment.