Skip Menu |

This queue is for tickets about the CPAN-Releases-Latest CPAN distribution.

Report information
The Basics
Id: 94829
Status: resolved
Priority: 0/
Queue: CPAN-Releases-Latest

People
Owner: NEILB [...] cpan.org
Requestors: KENTNL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.04
Fixed in: 0.05



Subject: "Live" network tests that take a while aught to be opt-in

Tests are fine, but ime, lots of people don't want to run network tests that take several minutes if they don't have to.

There's also something about vivifying a path in $ENV{HOME} during testing that I'm not too fond of.

Its not massively slow *every* time, but it varies

Heres a 5 minute run:

PERL_DL_NONLAZY=1 /home/kent/perl5/perlbrew/perls/perl-5.19.10/bin/perl5.19.10 "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01-require.t .... ok
t/02-bad-path.t ... ok
t/03-live-test.t .. ok
All tests successful.
Files=3, Tests=4, 291 wallclock secs ( 0.04 usr  0.01 sys +  4.23 cusr  0.48 csys =  4.76 CPU)

291 wallclock = 4.8 minutes.

And here's a 1 minute run:

rness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01-require.t .... ok
t/02-bad-path.t ... ok
t/03-live-test.t .. ok
All tests successful.
Files=3, Tests=4, 43 wallclock secs ( 0.03 usr  0.01 sys +  3.96 cusr  0.42 csys =  4.42 CPU)


And of course, its hard for an end user to repeat the slow tests due to touching $ENV{HOME} and you have to remove certain files to simply replicate the test :)

Another slow 4 minute run

PERL_DL_NONLAZY=1 /home/kent/perl5/perlbrew/perls/perl-5.19.10/bin/perl5.19.10 "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01-require.t .... ok
t/02-bad-path.t ... ok
t/03-live-test.t .. ok
All tests successful.
Files=3, Tests=4, 236 wallclock secs ( 0.03 usr  0.01 sys +  3.89 cusr  0.41 csys =  4.34 CPU)

Of course, once the cache is there its much faster:

PERL_DL_NONLAZY=1 /home/kent/perl5/perlbrew/perls/perl-5.19.10/bin/perl5.19.10 "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01-require.t .... ok
t/02-bad-path.t ... ok
t/03-live-test.t .. ok
All tests successful.
Files=3, Tests=4,  1 wallclock secs ( 0.03 usr  0.01 sys +  0.73 cusr  0.09 csys =  0.86 CPU)




 

Show quoted text
> Tests are fine, but ime, lots of people don't want to run network > tests that take several minutes if they don't have to.
Yow, I've never even got close to 4 or 5 minutes. Show quoted text
> There's also something about vivifying a path in $ENV{HOME} during > testing that > I'm not too fond of.
Yeah, good point. Show quoted text
> Its not massively slow *every* time, but it varies [...deletia...]
I'll have a think about the right way to address this later, but right off the bat I'm thinking that maybe the live test should be an author / release test only. Cheers, Neil
On 2014-04-17 03:00:42, KENTNL wrote: Show quoted text
> Tests are fine, but ime, lots of people don't want to run network > tests that > take several minutes if they don't have to.
Personally I wouldn't run any tests that use the network by default - they should be opt-in via RELEASE_TESTING or EXTENDED_TESTING. https://github.com/Perl-Toolchain-Gang/toolchain-site/blob/master/lancaster-consensus.md#environment-variables-for-testing-contexts
I still need to think a bit more about all the different ways I need to test this, but for now: * Moved that one test into xt/release/ * Created another release test * Added some other regular tests, none of which run long queries on MetaCPAN Cheers, Neil