Skip Menu |
 

This queue is for tickets about the BZ-Client CPAN distribution.

Report information
The Basics
Id: 119718
Status: resolved
Priority: 0/
Queue: BZ-Client

People
Owner: dean [...] fragfest.com.au
Requestors: KENTNL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 4.4
Fixed in: 4.4001



Subject: tests t/200bug.t and t/300classification.t run and fail despite NO_NETWORK_TESTING

I'm running in an isolated network sandbox.

These tests do as they should:

t/100bugzilla.t ........ skipped: NO_NETWORK_TESTING                    
t/101login.t ........... skipped: NO_NETWORK_TESTING

 

But these ones don't:

 

==(      31;0  0/?  0/? )==============================================# Trying server: https://landfill.bugzilla.org/bugzilla-4.4-branch/
# Error: 599, undef, Unknown error: Internal Exception : Could not connect to 'landfill.bugzilla.org:443': Name or service not known
===(      32;0   1/24  0/?  0/? )=======================================
#   Failed test 'status values correct'
#   at t/200bug.t line 129.
#     Structures begin differing at:
#          $got = ARRAY(0x3512c78)
#     $expected = undef
 

t/200bug.t           (Wstat: 6144 Tests: 24 Failed: 24)
  Failed tests:  1-24
  Non-zero exit status: 24
t/300classification.t (Wstat: 1536 Tests: 6 Failed: 6)
  Failed tests:  1-6
  Non-zero exit status: 6



-- 
- CPAN kentnl@cpan.org
- Gentoo Perl Maintainer kentnl@gentoo.org ( perl@gentoo.org )
 

thanks, will look at this asap
Download (untitled) / with headers
text/plain 133b
i have just pushed v4.4001_001 to the cpan. can you please verify it. once you have done so, i will push a version without the _001

I haven't tested it yet, but just some other thoughts:

 

400 and 500 do "discovery probes", they didn't fail, but they tried to dial out.
 

400 has this line, but commented out:

# use Test::RequiresInternet ( 'landfill.bugzilla.org' => 443 );

Same goes for 500

https://metacpan.org/source/DJZORT/BZ-Client-4.4001_002/t/500group.t#L18

 

Additionally, this guard block you're using could be done more lightweight:
 

+if ( not $ENV{TEST_AUTHOR}) {
+    plan skip_all => 'Author test. Set $ENV{TEST_AUTHOR} to a true value to run.';
+}

Partly, your current design requires your test suite to load and compile all its dependencies simply to emit a skip notice, which can be moderately expensive with Test2, and exacerbates the overall performance of test suites in the process.

Instead, its "nicer" to have a very early BEGIN block that executes before all your other 'use' constraints and simply uses print to indicate a plan skip.

 

 

BEGIN {
  unless ($ENV{TEST_AUTHOR}) {
    print qq{1..0 # SKIP these tests only run with TEST_AUTHOR set\n};
    exit
  }
}
 
This should be much more efficient.
 


 


 

-- 
- CPAN kentnl@cpan.org
- Gentoo Perl Maintainer kentnl@gentoo.org ( perl@gentoo.org )
 

Download (untitled) / with headers
text/plain 1.4k
Commenting out Test::RequiresInternet is/was absolutely the problem which i corrected in 4.4001_001 The other suggestions are very thoughtful and much appreciated. I will integrate them shortly On Sun Jan 08 22:53:29 2017, KENTNL wrote: Show quoted text
> I haven't tested it yet, but just some other thoughts: > > 400 and 500 do "discovery probes", they didn't fail, but they tried to > dial > out. > > 400 has this line, but commented out: > > # use Test::RequiresInternet ( 'landfill.bugzilla.org' => 443 ); > > Same goes for 500 > > https://metacpan.org/source/DJZORT/BZ-Client- > 4.4001_002/t/500group.t#L18 > > Additionally, this guard block you're using could be done more > lightweight: > > +if ( not $ENV{TEST_AUTHOR}) {+ plan skip_all => 'Author test. Set > $ENV{TEST_AUTHOR} to a true value to run.';+} > > Partly, your current design requires your test suite to load and > compile all > its dependencies simply to emit a skip notice, which can be moderately > expensive with Test2, and exacerbates the overall performance of test > suites in > the process. > > Instead, its "nicer" to have a very early BEGIN block that executes > before all > your other 'use' constraints and simply uses print to indicate a plan > skip. > > BEGIN { unless ($ENV{TEST_AUTHOR}) { print qq{1..0 # SKIP these tests > only run > with TEST_AUTHOR set\n}; exit }} > This should be much more efficient. > > > > -- > - CPAN kentnl@cpan.org > - Gentoo Perl Maintainer kentnl@gentoo.org ( perl@gentoo.org )
Download (untitled) / with headers
text/plain 162b
ive just pushed v4.4001_003 which incorporates the changes around TEST_AUTHOR. once cpantesters has 48 hours or so to chew on it, i will tag and release as 4.4001
Download (untitled) / with headers
text/plain 214b
On Sun Jan 29 00:51:43 2017, djzort wrote: Show quoted text
> ive just pushed v4.4001_003 which incorporates the changes around > TEST_AUTHOR. once cpantesters has 48 hours or so to chew on it, i will > tag and release as 4.4001


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.