X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F750firebird.t;h=d0923793cdf4a2805f8454c99d7365762cdc366a;hb=56653891210c588f8b894ef4968ac6476ca3325d;hp=32eb15487529945c6f8d5e8ac483cf6d2c39ddce;hpb=65d351219882184861384aedac6f251b6797d0d7;p=dbsrgits%2FDBIx-Class.git diff --git a/t/750firebird.t b/t/750firebird.t index 32eb154..d092379 100644 --- a/t/750firebird.t +++ b/t/750firebird.t @@ -42,6 +42,8 @@ for my $prefix (keys %$env2optdep) { SKIP: { next unless $dsn; + note "Testing with ${prefix}_DSN"; + skip ("Testing with ${prefix}_DSN needs " . DBIx::Class::Optional::Dependencies->req_missing_for( $env2optdep->{$prefix} ), 1) unless DBIx::Class::Optional::Dependencies->req_ok_for($env2optdep->{$prefix}); @@ -125,6 +127,7 @@ EOF # test savepoints throws_ok { $schema->txn_do(sub { + my ($schema, $ars) = @_; eval { $schema->txn_do(sub { $ars->create({ name => 'in_savepoint' }); @@ -135,7 +138,7 @@ EOF 'savepoint rolled back'); $ars->create({ name => 'in_outer_txn' }); die "rolling back outer txn"; - }); + }, $schema, $ars); } qr/rolling back outer txn/, 'correct exception for rollback'; @@ -252,6 +255,14 @@ EOF } 'inferring generator from trigger source works'; } + # at this point there should be no active statements + # (finish() was called everywhere, either explicitly via + # reset() or on DESTROY) + for (keys %{$schema->storage->dbh->{CachedKids}}) { + fail("Unreachable cached statement still active: $_") + if $schema->storage->dbh->{CachedKids}{$_}->FETCH('Active'); + } + # test blobs (stolen from 73oracle.t) eval { $dbh->do('DROP TABLE "bindtype_test"') }; $dbh->do(q[