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