Skip Menu |

This queue is for tickets about the CSS-Inliner CPAN distribution.

Report information
The Basics
Id: 96414
Status: resolved
Priority: 0/
Queue: CSS-Inliner

People
Owner: Nobody in particular
Requestors: lxp [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 3945
Fixed in: (no value)



Subject: t/embedded_style_block.t intermittently fails due to unnecessary remote call
t/embedded_style_block.t makes a remote GET request for a file that already exists under t/html. Since CSS::Inliner uses LWP::UserAgent internally, and LWP::UserAgent supports the use of file:// URLs, it should be reasonably easy to modify the test to retrieve that data via a file:// URL (unless code exists within CSS::Inliner itself which would prevent LWP from doing so). This would improve the reliability of this test, which would improve the CPAN Testers results. It would also marginally improve the speed of the test suite execution.
I know the exact test you are talking about, but unfortunately there isn't a great way of handling what I need to test here. The purpose of this particular test is to confirm the proper handling of a remote file. A local file:// would not properly exercise the various code paths involved. The use of rawgit.com seemed very clever when I first implemented it, but the maneuvering of that organization (I guess they had a copyright problem for a while) has definitely caused problems with this test. I think it would probably be better for me to print a warning along with the test if it fails, but removing the test or altering it would weaken the verification that things are working as they are supposed to. -Kevin On Thu Jun 12 22:11:02 2014, LXP wrote: Show quoted text
> t/embedded_style_block.t makes a remote GET request for a file that > already exists under t/html. > > Since CSS::Inliner uses LWP::UserAgent internally, and LWP::UserAgent > supports the use of file:// URLs, it should be reasonably easy to modify > the test to retrieve that data via a file:// URL (unless code exists > within CSS::Inliner itself which would prevent LWP from doing so). > > This would improve the reliability of this test, which would improve the > CPAN Testers results. It would also marginally improve the speed of the > test suite execution.
I've noticed an increasing number of failures from the CPAN auto-tests performed on this module. Seems those boxes purposefully disable network connectivity when running test suits - probably to prevent some sort of creative abuse. To resolve this issue and the related CPAN problem I've gone ahead and made execution of this particular test conditional upon the presence of network connectivity. If the test can reach rawgit.com the test executes, otherwise it just skips the entire test. This should resolve your specific concern. On Mon Jun 16 20:30:34 2014, KAMELKEV wrote: Show quoted text
> I know the exact test you are talking about, but unfortunately there > isn't a great way of handling what I need to test here. > > The purpose of this particular test is to confirm the proper handling > of a remote file. A local file:// would not properly exercise the > various code paths involved. > > The use of rawgit.com seemed very clever when I first implemented it, > but the maneuvering of that organization (I guess they had a copyright > problem for a while) has definitely caused problems with this test. > > I think it would probably be better for me to print a warning along > with the test if it fails, but removing the test or altering it would > weaken the verification that things are working as they are supposed > to. > > -Kevin > > On Thu Jun 12 22:11:02 2014, LXP wrote:
> > t/embedded_style_block.t makes a remote GET request for a file that > > already exists under t/html. > > > > Since CSS::Inliner uses LWP::UserAgent internally, and LWP::UserAgent > > supports the use of file:// URLs, it should be reasonably easy to > > modify > > the test to retrieve that data via a file:// URL (unless code exists > > within CSS::Inliner itself which would prevent LWP from doing so). > > > > This would improve the reliability of this test, which would improve > > the > > CPAN Testers results. It would also marginally improve the speed of > > the > > test suite execution.