X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fstorage%2Fdbi_env.t;h=fd5f1d6ce6099a92233b9b37f993e2653ab87206;hb=refs%2Ftags%2Fv0.08241;hp=f5275c3b4f121a3b51ad1bbb66ca76cb0c75395e;hpb=c1807ed502a52187c5f7654346ddf5135616576f;p=dbsrgits%2FDBIx-Class.git diff --git a/t/storage/dbi_env.t b/t/storage/dbi_env.t index f5275c3..fd5f1d6 100644 --- a/t/storage/dbi_env.t +++ b/t/storage/dbi_env.t @@ -1,4 +1,3 @@ -#!/usr/bin/perl use strict; use warnings; use lib qw(t/lib); @@ -8,9 +7,10 @@ use Test::Exception; BEGIN { delete @ENV{qw(DBI_DSN DBI_DRIVER)} } -my $schema; +$ENV{DBICTEST_LOCK_HOLDER} = -1; -DBICTest->init_schema(sqlite_use_file => 1); +# pre-populate +my $schema = DBICTest->init_schema(sqlite_use_file => 1); my $dbname = DBICTest->_sqlite_dbname(sqlite_use_file => 1); @@ -70,7 +70,7 @@ $schema = DBICTest::Schema->connect("dbi::$dbname"); lives_ok { count_sheep($schema) } 'SQLite in DBI_DRIVER'; isa_ok $schema->storage, 'DBIx::Class::Storage::DBI::SQLite'; -undef $ENV{DBI_DRIVER}; +delete $ENV{DBI_DRIVER}; $ENV{DBI_DSN} = "dbi:SQLite:$dbname"; $schema = DBICTest::Schema->connect; lives_ok { count_sheep($schema) } 'SQLite in DBI_DSN';