mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 22:28:47 -04:00
DBD-SQLite: added a comment to the busy test, and made the first timeout happen sooner
This commit is contained in:
parent
c944fdc5e4
commit
411cd59e82
1 changed files with 8 additions and 1 deletions
|
@ -30,7 +30,14 @@ foreach my $call_func (@CALL_FUNCS) {
|
||||||
AutoCommit => 0,
|
AutoCommit => 0,
|
||||||
);
|
);
|
||||||
|
|
||||||
ok($dbh2->$call_func(3000, 'busy_timeout'));
|
# NOTE: Let's make it clear what we're doing here.
|
||||||
|
# $dbh starts locking with the first INSERT statement.
|
||||||
|
# $dbh2 tries to INSERT, but as the database is locked,
|
||||||
|
# it starts waiting. However, $dbh won't release the lock.
|
||||||
|
# Eventually $dbh2 gets timed out, and spits an error, saying
|
||||||
|
# the database is locked. So, we don't need to let $dbh2 wait
|
||||||
|
# too much here. It should be timed out anyway.
|
||||||
|
ok($dbh2->$call_func(300, 'busy_timeout'));
|
||||||
|
|
||||||
ok($dbh->do("CREATE TABLE Blah ( id INTEGER, val VARCHAR )"));
|
ok($dbh->do("CREATE TABLE Blah ( id INTEGER, val VARCHAR )"));
|
||||||
ok($dbh->commit);
|
ok($dbh->commit);
|
||||||
|
|
Loading…
Add table
Reference in a new issue