12 my $wait_for = 120; # how many seconds to wait
14 # don't lock anything - this is a tempfile anyway
15 $ENV{DBICTEST_LOCK_HOLDER} = -1;
19 my $tmp = File::Temp->new(
23 TEMPLATE => 'DBIxClass-XXXXXX',
24 EXLOCK => 0, # important for BSD and derivatives
27 my $tmp_fn = $tmp->filename;
30 local $SIG{ALRM} = sub { die sprintf (
31 "Timeout of %d seconds reached (tempfile still open: %s)",
32 $wait_for, $close ? 'No' : 'Yes'
38 my $schema = DBICTest::Schema->connect ("DBI:SQLite:$tmp_fn");
39 $schema->storage->dbh_do(sub { $_[1]->do('PRAGMA synchronous = OFF') });
40 DBICTest->deploy_schema ($schema);
41 DBICTest->populate_schema ($schema);