Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^8: Failing Tests in MozRepl

by choroba (Cardinal)
on Feb 12, 2012 at 23:48 UTC ( [id://953365]=note: print w/replies, xml ) Need Help??


in reply to Re^7: Failing Tests in MozRepl
in thread Failing Tests in MozRepl

Thank you for your comments. Eventually, I was able to pass the tests, making these changes:
--- t/49-mech-nav.t~ 2012-02-12 12:07:33.000000000 +0100 +++ t/49-mech-nav.t 2012-02-12 19:57:38.423630818 +0100 @@ -26,6 +26,8 @@ $mech->get($server->url); +sleep 1; + $mech->click_button(number => 1); like( $mech->uri, qr/formsubmit/, 'Clicking on button by number' ); my $last = $mech->uri; --- t/51-click_button.t~ 2012-02-12 12:07:33.000000000 +0100 +++ t/51-click_button.t 2012-02-12 21:00:45.167679586 +0100 @@ -25,6 +25,7 @@ my $server = Test::HTTP::LocalServer->spawn(); $mech->get($server->url); +sleep 1; my @forms = $mech->forms; my $form = $forms[0]; --- t/70-mech-png.t~ 2012-02-12 12:07:33.000000000 +0100 +++ t/70-mech-png.t 2012-02-12 21:01:15.651678533 +0100 @@ -41,7 +41,7 @@ is_deeply $got, $_[1], $_[2] or diag Dumper $got; } else { - SKIP: skip "Image::Info not available", 1; + SKIP: { skip "Image::Info not available", 1; } }; }; --- t/70-real-status.t~ 2012-02-12 12:07:33.000000000 +0100 +++ t/70-real-status.t 2012-02-12 22:23:40.866996031 +0100 @@ -33,6 +33,7 @@ t::helper::run_across_instances(\@instances, $instance_port, \&new_me +ch, sub { my ($instance, $mech) = @_; $mech->get($server->url); + sleep 1; my $response = $mech->response; --- t/75-save_url-cookies.t~ 2012-02-12 12:07:33.000000000 +0100 +++ t/75-save_url-cookies.t 2012-02-13 00:30:03.986919932 +0100 @@ -45,7 +45,7 @@ $server->url->port, undef, undef, - 5, # 5 seconds expiry + 120, # 2 minutes expiry ); my $count;
Changes 1, 2, and 4 are just 1 second sleeps after a get; change 5 prolongs the cookies to 2 minutes (sometimes, 50 seconds was enough, but sometimes not, 120 is a safe guess). Change 3 makes the SKIP work - last cannot work without a block (2/12 Label not found for "last SKIP" at /usr/lib/perl5/5.14.2/Test/More.pm line 1256.) In some tests, Time::HiRes is used, but not really used.

Especially the cookie thing makes me wonder what could be the cause.

Replies are listed 'Best First'.
Re^9: Failing Tests in MozRepl
by Corion (Patriarch) on Feb 13, 2012 at 09:00 UTC

    Ouch - that skip block for Image::Info is a real bug in the tests.

    The rest really has me stumped. It really seems as if your machine is heavily loaded or unresponsive, but that's highly unlikely for a single-user machine... Especially that making the cookie timeout longer helps would mean that it takes more than five seconds to retrieve the cookie via mozrepl.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://953365]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2024-04-18 06:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found