[Bast-commits] r3656 - DBIx-Class/0.08/trunk/t

aherzog at dev.catalyst.perl.org aherzog at dev.catalyst.perl.org
Tue Aug 7 16:26:33 GMT 2007


Author: aherzog
Date: 2007-08-07 16:26:32 +0100 (Tue, 07 Aug 2007)
New Revision: 3656

Modified:
   DBIx-Class/0.08/trunk/t/33storage_reconnect.t
Log:
Fix reconnect tests to skip tests that won't pass (when run as root, or under windows).


Modified: DBIx-Class/0.08/trunk/t/33storage_reconnect.t
===================================================================
--- DBIx-Class/0.08/trunk/t/33storage_reconnect.t	2007-08-07 15:25:28 UTC (rev 3655)
+++ DBIx-Class/0.08/trunk/t/33storage_reconnect.t	2007-08-07 15:26:32 UTC (rev 3656)
@@ -49,11 +49,15 @@
 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" );
+}




More information about the Bast-commits mailing list