X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F81transactions.t;h=a13c651f383a2cae282af9b01fb8036cacee237c;hb=b13d22484161991bed36099c9e473c4ea67c84c9;hp=2a592e129acfc21b0f9cf98d76d20b943f9788db;hpb=257a1d3b8fb3d5509b132a9497bfe34662e8d29e;p=dbsrgits%2FDBIx-Class.git diff --git a/t/81transactions.t b/t/81transactions.t index 2a592e1..a13c651 100644 --- a/t/81transactions.t +++ b/t/81transactions.t @@ -150,10 +150,9 @@ my $fail_code = sub { no warnings 'redefine'; no strict 'refs'; - # die in rollback, but maintain sanity for further tests ... + # die in rollback local *{"DBIx::Class::Storage::DBI::SQLite::txn_rollback"} = sub{ my $storage = shift; - $storage->{transaction_depth}--; die 'FAILED'; }; @@ -180,6 +179,9 @@ my $fail_code = sub { $schema->storage->_dbh->rollback; } +# reset schema object (the txn_rollback meddling screws it up) +$schema = DBICTest->init_schema(); + # Test nested failed txn_do() { is( $schema->storage->{transaction_depth}, 0, 'txn depth starts at 0');