Bug#439470: libtest-www-mechanize-perl: FTBFS: t/page_links_content failed

Niko Tyni ntyni at iki.fi
Sun Aug 26 20:50:36 UTC 2007


clone 439470 -1
reassign -1 libhttp-server-simple-perl 0.27-1
retitle -1 libhttp-server-simple-perl: background() returns before the server is accepting requests
severity -1 important
tag 439470 patch
forwarded 439470 http://rt.cpan.org/Public/Bug/Display.html?id=27168
forwarded -1 http://rt.cpan.org/Public/Bug/Display.html?id=28122
thanks

On Sat, Aug 25, 2007 at 10:28:00AM +0200, Lucas Nussbaum wrote:
> Package: libtest-www-mechanize-perl
> version: 1.14-1
> Severity: serious
> User: debian-qa at lists.debian.org
> Usertags: qa-ftbfs-20070823 qa-ftbfs
> Justification: FTBFS on i386
> t/page_links_content....
> #   Failed test 'Handles link content not found'
> #   in t/page_links_content.t at line 47.
> # STDOUT is:
> # ok 1 - Checking all page link content failures
> # 
> # not:
> # not ok 1 - Checking all page link content failures

This is a non-deterministic timing problem.

The HTTP::Server::Simple::background() function returns before it is ready
to answer requests, and when the test script runs quick enough, it gets
an unnoticed 'connection refused' from Test::WWW::Mechanize::get(). The
script is then left with an empty array of links to test.

This should be fixed in HTTP::Server::Simple; cloning accordingly.  As a
workaround for Test::WWW::Mechanize, either inserting a sleep call after
the HTTP::Server::Simple::background() call or retrying a few times when
the connection is refused should fix this.

I'm attaching a patch for the sleep() option to keep the tests simple. It
also adds an early test to verify that the server responded, for better
diagnostics.

The issues are already reported upstream as CPAN #27168
(Test::WWW::Mechanize) and CPAN #28122 (HTTP::Server::Simple). I'll
follow up on those when I find the time.

Cheers,
-- 
Niko Tyni   ntyni at iki.fi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 439470.patch
Type: text/x-diff
Size: 620 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20070826/64089ba2/attachment.patch 


More information about the pkg-perl-maintainers mailing list