From 975005919782a7c5034ae9283a81fbb435e20a06 Mon Sep 17 00:00:00 2001 From: Kenichi Ishigaki Date: Sat, 15 Aug 2009 10:02:53 +0000 Subject: [PATCH] DBD-SQLite: wrapped the second insert (which may be timed out in the worst case) with eval not to abort the test --- t/08_busy.t | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/t/08_busy.t b/t/08_busy.t index 51ac532..1196efc 100644 --- a/t/08_busy.t +++ b/t/08_busy.t @@ -97,8 +97,15 @@ foreach my $call_func (@CALL_FUNCS) { chomp($line); ok($line, "Ready"); ok($dbh->$call_func(100000, 'busy_timeout')); - ok($dbh->do("INSERT INTO Blah VALUES (4, 'Test4' )")); - $dbh->commit; + eval { $dbh->do("INSERT INTO Blah VALUES (4, 'Test4' )") }; + ok !$@; + if ($@) { + print "# Your testing environment might be too slow to pass this test: $@"; + $dbh->rollback; + } + else { + $dbh->commit; + } wait; $dbh->disconnect; unlink 'foo';