From: Peter Rabbitson Date: Wed, 1 Jul 2009 13:55:21 +0000 (+0000) Subject: Segfault X-Git-Tag: v0.08108~35^2~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8c52ffd309c4584a7fa7cbe9622de756d42460f2;p=dbsrgits%2FDBIx-Class.git Segfault --- diff --git a/t/74mssql.t b/t/74mssql.t index 7b4ddd3..c0cea0c 100644 --- a/t/74mssql.t +++ b/t/74mssql.t @@ -9,6 +9,7 @@ BEGIN { } use Test::More; +use Test::Exception; use lib qw(t/lib); use DBICTest; @@ -17,7 +18,7 @@ my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_MSSQL_${_}" } qw/DSN USER PASS/}; plan skip_all => 'Set $ENV{DBICTEST_MSSQL_DSN}, _USER and _PASS to run this test' unless ($dsn); -plan tests => 6; +plan tests => 7; my $schema = DBICTest::Schema->clone; $schema->connection($dsn, $user, $pass); @@ -26,10 +27,13 @@ $schema->connection($dsn, $user, $pass); $schema->storage->ensure_connected; $schema->storage->_dbh->disconnect; -my $dbh = $schema->storage->dbh; - isa_ok($schema->storage, 'DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server'); +my $dbh; +lives_ok (sub { + $dbh = $schema->storage->dbh; +}, 'reconnect works'); + $dbh->do("IF OBJECT_ID('artist', 'U') IS NOT NULL DROP TABLE artist"); $dbh->do("IF OBJECT_ID('cd', 'U') IS NOT NULL