X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F52leaks.t;h=e2ed738621d573a7bd4191feff0b65ed52015d88;hb=908aa1bb761ec1da5c061fe9f687598e3f1934bc;hp=796453b1e9b13aadd6b258a92ef55fab3a729012;hpb=7be5717eb2be4fa484e665853777f1c10c6deced;p=dbsrgits%2FDBIx-Class.git diff --git a/t/52leaks.t b/t/52leaks.t index 796453b..e2ed738 100644 --- a/t/52leaks.t +++ b/t/52leaks.t @@ -79,6 +79,10 @@ unless (DBICTest::RunMode->is_plain) { } ); + # unicode is tricky, and now we happen to invoke it early via a + # regex in connection() + return $obj if (ref $obj) =~ /^utf8/; + # Test Builder is now making a new object for every pass/fail (que bloat?) # and as such we can't really store any of its objects (since it will # re-populate the registry while checking it, ewwww!) @@ -358,6 +362,16 @@ for my $slot (keys %$weak_registry) { delete $weak_registry->{$slot} unless $cleared->{hash_merge_singleton}{$weak_registry->{$slot}{weakref}{behavior}}++; } + elsif ( + $slot =~ /^Data::Dumper/ + and + $weak_registry->{$slot}{stacktrace} =~ /\QDBIx::Class::ResultSource::_mk_row_parser/ + ) { + # there should be only one D::D object (used to construct the rowparser) + # more would indicate trouble + delete $weak_registry->{$slot} + unless $cleared->{mk_row_parser_dd_singleton}++; + } elsif (DBIx::Class::_ENV_::INVISIBLE_DOLLAR_AT and $slot =~ /^__TxnScopeGuard__FIXUP__/) { delete $weak_registry->{$slot} } @@ -418,6 +432,12 @@ assert_empty_weakregistry ($weak_registry); # this is ugly and dirty but we do not yet have a Test::Embedded or # similar +# set up -I +require Config; +$ENV{PERL5LIB} = join ($Config::Config{path_sep}, @INC); +($ENV{PATH}) = $ENV{PATH} =~ /(.+)/; + + my $persistence_tests = { PPerl => { cmd => [qw/pperl --prefork=1/, __FILE__], @@ -442,10 +462,6 @@ SKIP: { skip 'Main test failed - skipping persistent env tests', 1 unless $TB->is_passing; - # set up -I - require Config; - local $ENV{PERL5LIB} = join ($Config::Config{path_sep}, @INC); - local $ENV{DBICTEST_IN_PERSISTENT_ENV} = 1; require IPC::Open2;