X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fstorage%2Fsavepoints.t;fp=t%2Fstorage%2Fsavepoints.t;h=3da77f16f56cdfb4edfed43985d369ceb300d899;hb=fd2c6658f74eda2831017727d3890dffd0eff06c;hp=5866e6dfe5d84dcdf59373a38938bfd50924f6bd;hpb=da4a8fe752719362c6f6b1be5b42593fc4509ad6;p=dbsrgits%2FDBIx-Class.git diff --git a/t/storage/savepoints.t b/t/storage/savepoints.t index 5866e6d..3da77f1 100644 --- a/t/storage/savepoints.t +++ b/t/storage/savepoints.t @@ -3,6 +3,7 @@ use warnings; use Test::More; use Test::Exception; +use DBIx::Class::_Util qw(modver_gt_or_eq sigwarn_silencer); use lib qw(t/lib); use DBICTest; @@ -227,6 +228,15 @@ for ('', keys %$env2optdep) { SKIP: { is_deeply( $schema->storage->savepoints, [], 'All savepoints forgotten' ); +SKIP: { + skip "Reading inexplicably fails on very old replicated DBD::SQLite<1.33", 1 if ( + $ENV{DBICTEST_VIA_REPLICATED} + and + $prefix eq 'SQLite Internal DB' + and + ! modver_gt_or_eq('DBD::SQLite', '1.33') + ); + ok($ars->search({ name => 'in_outer_transaction' })->first, 'commit from outer transaction'); ok($ars->search({ name => 'in_outer_transaction2' })->first, @@ -236,6 +246,7 @@ for ('', keys %$env2optdep) { SKIP: { is $ars->search({ name => 'in_inner_transaction_rolling_back' })->first, undef, 'rollback from inner transaction'; +} ### cleanupz $schema->storage->dbh_do(sub { $_[1]->do("DROP TABLE artist") }); @@ -244,6 +255,8 @@ for ('', keys %$env2optdep) { SKIP: { done_testing; END { + local $SIG{__WARN__} = sigwarn_silencer( qr/Internal transaction state of handle/ ) + unless modver_gt_or_eq('DBD::SQLite', '1.33'); eval { $schema->storage->dbh_do(sub { $_[1]->do("DROP TABLE artist") }) } if defined $schema; undef $schema; }