From: Jerry D. Hedden Date: Mon, 5 Jun 2006 13:28:51 +0000 (-0700) Subject: random thread test failure X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4acc73f2d0ba854b38b396079e595335be75e7f8;hp=58a3a76cb3552fafeb21957d1f17da114f2f65ec;p=p5sagit%2Fp5-mst-13.2.git random thread test failure From: "Jerry D. Hedden" Message-ID: <20060605132851.fb30e530d17747c2b054d625b8945d88.65486bb40b.wbe@email.secureserver.net> p4raw-id: //depot/perl@28356 --- diff --git a/ext/threads/t/thread.t b/ext/threads/t/thread.t index 23bd1bf..0f037d6 100644 --- a/ext/threads/t/thread.t +++ b/ext/threads/t/thread.t @@ -160,8 +160,8 @@ package main; ok($th->join()); } { - # there is a little chance this test case will falsly fail - # since it tests rand + # There is a slight chance (<< 1%) this test case will falsely fail + # since it tests using rand() my %rand : shared; rand(10); threads->create( sub { $rand{int(rand(10000000000))}++ } ) foreach 1..25; @@ -169,7 +169,7 @@ package main; # use Data::Dumper qw(Dumper); # print Dumper(\%rand); #$val = rand(); - ok((keys %rand == 25), "Check that rand works after a new thread"); + ok((keys %rand >= 24), "Check that rand() works after a new thread"); } # bugid #24165