mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 22:28:47 -04:00
DBD-SQLite: wrapped the second insert (which may be timed out in the worst case) with eval not to abort the test
This commit is contained in:
parent
692a7840b1
commit
9750059197
1 changed files with 9 additions and 2 deletions
11
t/08_busy.t
11
t/08_busy.t
|
@ -97,8 +97,15 @@ foreach my $call_func (@CALL_FUNCS) {
|
||||||
chomp($line);
|
chomp($line);
|
||||||
ok($line, "Ready");
|
ok($line, "Ready");
|
||||||
ok($dbh->$call_func(100000, 'busy_timeout'));
|
ok($dbh->$call_func(100000, 'busy_timeout'));
|
||||||
ok($dbh->do("INSERT INTO Blah VALUES (4, 'Test4' )"));
|
eval { $dbh->do("INSERT INTO Blah VALUES (4, 'Test4' )") };
|
||||||
$dbh->commit;
|
ok !$@;
|
||||||
|
if ($@) {
|
||||||
|
print "# Your testing environment might be too slow to pass this test: $@";
|
||||||
|
$dbh->rollback;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$dbh->commit;
|
||||||
|
}
|
||||||
wait;
|
wait;
|
||||||
$dbh->disconnect;
|
$dbh->disconnect;
|
||||||
unlink 'foo';
|
unlink 'foo';
|
||||||
|
|
Loading…
Add table
Reference in a new issue