Skip Menu |

This queue is for tickets about the Catalyst-Plugin-LeakTracker CPAN distribution.

Report information
The Basics
Id: 49620
Status: resolved
Priority: 0/
Queue: Catalyst-Plugin-LeakTracker

People
Owner: Nobody in particular
Requestors: wdhawes [...] gmail.com (daily)
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.01
Fixed in: (no value)



Subject: Failing test
Test number 10 in t\live-test.t fails for me on ActivePerl 5.8.822 on Win32: t\live-test....ok 1 - use TestApp; ok 2 - get main page ok 3 - see if it has our text ok 4 - one tracker ok 5 - no leaked objects ok 6 - get main page ok 7 - see if it has our text ok 8 - one tracker ok 9 - no leaked objects not ok 10 - Class counts correct # Failed test 'Class counts correct' # at t\live-test.t line 41. # Structures begin differing at: # $got->{URI::http} = '0' # $expected->{URI::http} = Does not exist 1..10 # Looks like you failed 1 test of 10. Having dumped the variable in question, it looks like this: $VAR1 = { 'class::c' => 1, 'class::a' => 1, 'URI::http' => 0, 'Catalyst::Stats' => 0, 'TestApp' => 0, 'class::b' => 0 }; The actual object counts look to be ok, so I guess this is maybe something to do with updates to Catalyst that have happened since the plugin was released (I'm currently using 5.80007). I've attached a patch that fixes it for me and aims to protect against any future changes of a similar nature, hopefully it's helpful. Thanks, Will
Subject: patch.txt
--- t\live-test.t Fri Sep 11 11:53:12 2009 +++ t\live-test.t.patched Fri Sep 11 11:53:01 2009 @@ -38,13 +38,8 @@ is( scalar( keys %$live_objects ), 2, "no leaked objects" ); -is_deeply( - $t[0]->class_counters, - { - 'class::a' => 1, - 'class::b' => 0, - 'class::c' => 1, - }, - "Class counts correct", -); +my $counts = $t[0]->class_counters; +is( $counts->{'class::a'}, 1, 'class::a count correct' ); +is( $counts->{'class::b'}, 0, 'class::b count correct' ); +is( $counts->{'class::c'}, 1, 'class::c count correct' );
Thanks, applied!