Changeset 155

Show
Ignore:
Timestamp:
02/09/09 18:25:39 (10 months ago)
Author:
swistow
Message:

Don't throw exceptions in the test suite if we can't connect to the database

Some of the tests pass "duff" parameters to test failing dbh connections

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/use-existing-dbh/t/lib/db-common.pl

    r153 r155  
    5555    if ($ENV{USE_DBH_FOR_TEST}) { 
    5656        my @tmp; 
    57         for (@$dbs) { 
     57        for (@$dbs) { eval { 
    5858            my $dsn    = dsn_for($_);   
    5959            my $dbh    = DBI->connect( $dsn, "root", "", { 
     
    6464            my $driver =  Data::ObjectDriver::Driver::DBI->new( dbh => $dbh);  
    6565            push @tmp, { driver => $driver, prefix => $pfx }; 
    66         } 
     66        } } 
    6767        return TheSchwartz->new(databases => [@tmp]);  
    6868    } else {