From: Adam Herzog Date: Tue, 7 Aug 2007 15:26:32 +0000 (+0000) Subject: Fix reconnect tests to skip tests that won't pass (when run as root, or under windows). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=413abe68f2f876befb1a4208aa3a57d9d04dd0b7;p=dbsrgits%2FDBIx-Class-Historic.git Fix reconnect tests to skip tests that won't pass (when run as root, or under windows). --- diff --git a/t/33storage_reconnect.t b/t/33storage_reconnect.t index f069ef0..8dcaeec 100644 --- a/t/33storage_reconnect.t +++ b/t/33storage_reconnect.t @@ -49,11 +49,15 @@ ok( $@, 'The operation failed' ); unlink($db_orig); move( $db_tmp, $db_orig ); -### Try the operation again... this time, it should succeed -my @art_four; -eval { - @art_four = $schema->resultset("Artist")->search( {}, { order_by => 'name DESC' } ); -}; -ok( !$@, 'The operation succedded' ); -cmp_ok( @art_four, '==', 3, "Three artists returned" ); - +SKIP: { + skip "Cannot reconnect if original connection didn't fail", 2 + if ( $@ =~ /encrypted or is not a database/ ); + + ### Try the operation again... this time, it should succeed + my @art_four; + eval { + @art_four = $schema->resultset("Artist")->search( {}, { order_by => 'name DESC' } ); + }; + ok( !$@, 'The operation succeeded' ); + cmp_ok( @art_four, '==', 3, "Three artists returned" ); +}