X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fstorage%2Ferror.t;h=6c9b15cd992cbcd433cb37b1377ce62f1d142731;hb=8d73fcd44e0441f0252744be32bada6816c5ff6b;hp=e15aa1dd24470ec3754398f4384876aa36be0794;hpb=0007aedf713cd43ec7c96e95209a1c4117a5a851;p=dbsrgits%2FDBIx-Class.git diff --git a/t/storage/error.t b/t/storage/error.t index e15aa1d..6c9b15c 100644 --- a/t/storage/error.t +++ b/t/storage/error.t @@ -6,8 +6,7 @@ use Test::Warn; use Test::Exception; use lib qw(t/lib); -use_ok( 'DBICTest' ); -use_ok( 'DBICTest::Schema' ); +use DBICTest; my $schema = DBICTest->init_schema; @@ -16,7 +15,11 @@ warnings_are ( sub { sub { $schema->resultset('CD')->create({ title => 'vacation in antarctica' }) }, - qr/DBI Exception.+constraint failed.+cd\.artist.+NULL/s + qr/DBI Exception.+(?x: + \QNOT NULL constraint failed: cd.artist\E + | + \Qcd.artist may not be NULL\E + )/s ); # as opposed to some other error }, [], 'No warnings besides exception' ); @@ -34,7 +37,11 @@ throws_ok ( # destruction of everything except the $dbh should use the proper # exception fallback: -{ +SKIP: { + if ( !!DBIx::Class::_ENV_::PEEPEENESS ) { + skip "Your perl version $] appears to leak like a sieve - skipping garbage collected \$schema test", 1; + } + undef ($schema); throws_ok ( sub {