Skip to content

Commit

Permalink
rand() makes for random failures. for now, don't use it
Browse files Browse the repository at this point in the history
  • Loading branch information
jrockway committed Sep 24, 2007
1 parent 26be673 commit b3b4d4e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions t/application/tag_cloud.t
Expand Up @@ -15,13 +15,14 @@ my $mech = Angerwhale::Test->new;
my @words = qw|foo bar baz quux red orange yellow 日本語
green blue indigo violet things-i-like|;

word:
foreach my $word (@words){
$mech->article(Encode::encode('utf-8', $word));
my $file = $mech->tmp->exists($word);
my $i = 1;

foreach my $tag (@words) {
set_attribute($file, "tags.$tag", int rand 10);
last if rand() < 1/(15-$i++)
set_attribute($file, "tags.$tag", 1);
}
}

Expand Down

0 comments on commit b3b4d4e

Please sign in to comment.