X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F52leaks.t;h=f1d11afee66be5d951670baa400376d14ac481a0;hb=a5ef13717f29f8662a498a5f1a910b03af2d89da;hp=800ec22d58eaaf384d139df54e52ff5983818523;hpb=7536c92b1affd50dd567cb1acae7a38f2222d04d;p=dbsrgits%2FDBIx-Class.git diff --git a/t/52leaks.t b/t/52leaks.t index 800ec22..f1d11af 100644 --- a/t/52leaks.t +++ b/t/52leaks.t @@ -361,17 +361,16 @@ for my $slot (keys %$weak_registry) { delete $weak_registry->{$slot}; } elsif ($slot =~ /^SQL::Translator::Generator::DDL::SQLite/) { - # SQLT got much better, but still leaks a little - delete $weak_registry->{$slot}; + # SQLT::Producer::SQLite keeps global generators around for quoted + # and non-quoted DDL, allow one for each quoting style + delete $weak_registry->{$slot} + unless $cleared->{sqlt_ddl_sqlite}->{@{$weak_registry->{$slot}{weakref}->quote_chars}}++; } elsif ($slot =~ /^Hash::Merge/) { # only clear one object of a specific behavior - more would indicate trouble delete $weak_registry->{$slot} unless $cleared->{hash_merge_singleton}{$weak_registry->{$slot}{weakref}{behavior}}++; } - elsif (DBIx::Class::_ENV_::INVISIBLE_DOLLAR_AT and $slot =~ /^__TxnScopeGuard__FIXUP__/) { - delete $weak_registry->{$slot} - } elsif ($slot =~ /^DateTime::TimeZone/) { # DT is going through a refactor it seems - let it leak zones for now delete $weak_registry->{$slot}; @@ -411,13 +410,16 @@ for my $moniker ( keys %{DBICTest::Schema->source_registrations || {}} ) { # half of it is in XS no leaktracer sees it, and Devel::FindRef is equally # stumped when trying to trace the origin. The problem is: # -# $cond_object --> result_source --> schema --> storage --> $dbh --> {cached_kids} +# $cond_object --> result_source --> schema --> storage --> $dbh --> {CachedKids} # ^ / # \-------- bound value on prepared/cached STH <-----------/ # -if ( my $r = $weak_registry->{'basic leaky_resultset_cond'}{weakref} ) { - ok(! defined $r, 'Self-referential RS conditions no longer leak!') - or $r->result_source(undef); +{ + local $TODO = 'This fails intermittently - see RT#82942'; + if ( my $r = $weak_registry->{'basic leaky_resultset_cond'}{weakref} ) { + ok(! defined $r, 'Self-referential RS conditions no longer leak!') + or $r->result_source(undef); + } } assert_empty_weakregistry ($weak_registry);