-#!/usr/bin/perl
use strict;
use warnings;
use lib qw(t/lib);
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);
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';