[Http-webtest-general] Re: make test 02/#35 failure for WebTest 2.00
Brought to you by:
m_ilya,
richardanderson
From: Ilya M. <il...@ma...> - 2003-01-03 22:17:20
|
>>>>> On Fri, 03 Jan 2003 16:25:32 +0100, Johannes la Poutre <joe...@us...> said: JP> Ilya, JP> While running make test for HTTP::WebTest I got a failure for test JP> suite t/02-generic.t, subtest #35, JP> The failure is caused by a timeout that is expected to take 1 second JP> but in practice appears to be 0: JP> - 30 Response time ( 1.00 ) is < or = 10.00 ? JP> SUCCEED JP> + 30 Response time ( 0.00 ) is < or = 10.00 ? JP> SUCCEED JP> not ok 35 JP> # Failed test 35 in [...]/SelfTest.pm at line 340 fail #28 JP> FAILED test 35 JP> Failed 1/35 tests, 97.14% okay I think it is just a rounding error. Since response time vary in each test run it should be rounded when it is compared with t/test.out/timeout file. As it was implented response time 0.99 was rounded to 0.00 what breaks this test. Can you please try following patch: *** 02-generic.t.~1.24.~ Mon Dec 23 00:25:50 2002 --- 02-generic.t Sat Jan 4 01:03:13 2003 *************** *** 651,659 **** my $out_filter = sub { $_[0] =~ s|( Response \s+ time \s+ \( \s+ ) ! ( \d+ \. ) ( \d+ ) ( \s+ \) ) ! |"$1$2" . ('0' x length($3)) . "$4"|xge; }; check_webtest(webtest => $WEBTEST, --- 651,659 ---- my $out_filter = sub { $_[0] =~ s|( Response \s+ time \s+ \( \s+ ) ! ( \d+ \. \d+ ) ( \s+ \) ) ! |"$1" . sprintf('%.2f', int $2 + 0.25) . "$3"|xge; }; check_webtest(webtest => $WEBTEST, JP> [..snip..] JP> P.S. shouldn't we have the bug reporting feature on Sourceforge, or JP> rather use the one on rt.cpan.org? I prefer to use rt.cpan.org. It seems to be more "standart" place for bug reports for Perl modules. -- Ilya Martynov, il...@ip... CTO IPonWEB (UK) Ltd Quality Perl Programming and Unix Support UK managed @ offshore prices - http://www.iponweb.net Personal website - http://martynov.org |