X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FDBICTest%2FUtil%2FLeakTracer.pm;h=bb1b73eeaa72849ae541f057d4fb87861b4a7ad3;hb=5dc4301c1efffd93c4fc69804dfeae875f8ed0e6;hp=600a66797208e92e7373993c608a2ef1a71d9166;hpb=21aa86aae083ccb5b94ba994dec030627e95e40b;p=dbsrgits%2FDBIx-Class.git diff --git a/t/lib/DBICTest/Util/LeakTracer.pm b/t/lib/DBICTest/Util/LeakTracer.pm index 600a667..bb1b73e 100644 --- a/t/lib/DBICTest/Util/LeakTracer.pm +++ b/t/lib/DBICTest/Util/LeakTracer.pm @@ -223,7 +223,7 @@ sub assert_empty_weakregistry { next if ! defined $weak_registry->{$addr}{weakref}; - $leaks_found++; + $leaks_found++ unless $tb->in_todo; $tb->ok (0, "Leaked $weak_registry->{$addr}{display_name}"); my $diag = do { @@ -239,6 +239,9 @@ sub assert_empty_weakregistry { ; }; + # FIXME - need to add a circular reference seeker based on the visitor + # (will need a bunch of modifications, punting with just a stub for now) + $diag .= Devel::FindRef::track ($weak_registry->{$addr}{weakref}, 50) . "\n" if ( $ENV{TEST_VERBOSE} && eval { require Devel::FindRef }); @@ -251,7 +254,7 @@ sub assert_empty_weakregistry { $tb->diag($diag); } - if (! $quiet and ! $leaks_found) { + if (! $quiet and !$leaks_found and ! $tb->in_todo) { $tb->ok(1, sprintf "No leaks found at %s line %d", (caller())[1,2] ); } }