Really fix SQLite savepoints unlike the shortsighted 398215b1
[dbsrgits/DBIx-Class.git] / t / storage / savepoints.t
index 0c56afc..b42ceca 100644 (file)
@@ -228,6 +228,9 @@ for ('', keys %$env2optdep) { SKIP: {
     undef,
     'rollback from inner transaction';
 
+  # make sure a fresh txn will work after above
+  $schema->storage->txn_do(sub { ok "noop" } );
+
 ### cleanupz
   $schema->storage->dbh->do ("DROP TABLE artist");
 }}
@@ -235,6 +238,6 @@ for ('', keys %$env2optdep) { SKIP: {
 done_testing;
 
 END {
-  eval { $schema->storage->dbh->do ("DROP TABLE artist") } if defined $schema;
+  eval { $schema->storage->dbh_do(sub { $_[1]->do("DROP TABLE artist") }) } if defined $schema;
   undef $schema;
 }