Skip to content

Commit

Permalink
Up the busy-timeout for multiple connections test
Browse files Browse the repository at this point in the history
This started failing with 'database is locked' at some point
for some systems.  It will only slow down the tests in those cases
where it was going to fail anyway.

Fixes #136
  • Loading branch information
jonathanstowe committed Dec 24, 2018
1 parent 80029f8 commit 5e3ef11
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion t/43-sqlite-threads.t
Expand Up @@ -24,6 +24,7 @@ my $dbh = DBIish.connect("SQLite", :$database);
END try $dbh.dispose;
$dbh.do('CREATE TABLE nom ( name varchar(50) )');


# Check that it is possible to work with the database from multiple threads
# at once with a single connection option. This works in SQLite's serialized
# mode, which is the default.
Expand Down Expand Up @@ -59,7 +60,7 @@ subtest 'Statements across threads on one connection' => {
subtest 'Multiple connections, one per thread' => {
my @inserters = do for ^5 -> $thread {
start {
my $dbht = DBIish.connect("SQLite", :$database);
my $dbht = DBIish.connect("SQLite", :$database, busy-timeout => 30000);
for ^100 {
my $sth = $dbht.prepare(q:to/STATEMENT/);
INSERT INTO nom (name)
Expand Down

0 comments on commit 5e3ef11

Please sign in to comment.