8 require DBICTest::RunMode;
9 plan( skip_all => "Skipping test on plain module install" )
10 if DBICTest::RunMode->is_plain;
18 my $wait_for = 120; # how many seconds to wait
20 # don't lock anything - this is a tempfile anyway
21 $ENV{DBICTEST_LOCK_HOLDER} = -1;
25 my $tmp = File::Temp->new(
29 TEMPLATE => 'DBIxClass-XXXXXX',
30 EXLOCK => 0, # important for BSD and derivatives
33 my $tmp_fn = $tmp->filename;
36 local $SIG{ALRM} = sub { die sprintf (
37 "Timeout of %d seconds reached (tempfile still open: %s)",
38 $wait_for, $close ? 'No' : 'Yes'
44 my $schema = DBICTest::Schema->connect ("DBI:SQLite:$tmp_fn");
45 $schema->storage->dbh_do(sub { $_[1]->do('PRAGMA synchronous = OFF') });
46 DBICTest->deploy_schema ($schema);
47 DBICTest->populate_schema ($schema);