Allow for tests to run in parallel (simultaneously from multiple checkouts)
[dbsrgits/DBIx-Class.git] / t / storage / reconnect.t
index a4b7ad0..b28734b 100644 (file)
@@ -8,7 +8,7 @@ use Test::Exception;
 use lib qw(t/lib);
 use DBICTest;
 
-my $db_orig = "$FindBin::Bin/../var/DBIxClass.db";
+my $db_orig = DBICTest->_sqlite_dbfilename;
 my $db_tmp  = "$db_orig.tmp";
 
 # Set up the "usual" sqlite for DBICTest
@@ -54,8 +54,8 @@ chmod 0000, $db_orig;
     } 'The operation failed';
 }
 
-# otherwise can't unlink the fake db file on these systems
-$schema->storage->_dbh->disconnect if $^O =~ /MSWin32|cygwin/i;
+# otherwise can't unlink the fake db file
+$schema->storage->_dbh->disconnect if $^O eq 'MSWin32';
 
 ### Now, move the db file back to the correct name
 unlink($db_orig) or die "could not delete $db_orig: $!";