add a couple of dbd::sybase reconnection tests
Rafael Kitover [Wed, 1 Jul 2009 13:25:46 +0000 (13:25 +0000)]
t/746sybase.t
t/74mssql.t

index f09862f..10378cf 100644 (file)
@@ -14,7 +14,10 @@ plan tests => 12;
 
 my $schema = DBICTest::Schema->connect($dsn, $user, $pass, {AutoCommit => 1});
 
+# start disconnected to test reconnection
 $schema->storage->ensure_connected;
+$schema->storage->disconnect;
+
 isa_ok( $schema->storage, 'DBIx::Class::Storage::DBI::Sybase' );
 
 $schema->storage->dbh_do (sub {
index 72e6552..7de09ef 100644 (file)
@@ -22,6 +22,10 @@ plan tests => 6;
 my $schema = DBICTest::Schema->clone;
 $schema->connection($dsn, $user, $pass);
 
+# start disconnected to test reconnection
+$schema->storage->ensure_connected;
+$schema->storage->disconnect;
+
 my $dbh = $schema->storage->dbh;
 
 isa_ok($schema->storage, 'DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server');