preaction / Yancy

The Best Web Framework Deserves the Best Content Management System
http://preaction.me/yancy/
Other
54 stars 21 forks source link

DBD::SQLite::db do failed: database is locked #106

Closed eserte closed 4 years ago

eserte commented 4 years ago

t/backend/dbic.t fails on some of my smoker systems (FreeBSD):

DBIx::Class::Storage::DBI::catch {...} (): DBIx::Class::Storage::DBI::try {...} (): DBI Exception: DBD::SQLite::db do failed: database is locked [for Statement "CREATE TABLE mojo_migrations (
  name text NOT NULL,
  version bigint NOT NULL
)"] at t/backend/dbic.t line 56
 (running "CREATE TABLE mojo_migrations (
  name text NOT NULL,
  version bigint NOT NULL
)") at t/backend/dbic.t line 56
DBIx::Class::Storage::DBI::catch {...} (): DBIx::Class::Storage::DBI::try {...} (): DBI Exception: DBD::SQLite::db do failed: database is locked [for Statement "CREATE UNIQUE INDEX mojo_migrations_name_key ON mojo_migrations (name)"] at t/backend/dbic.t line 56
... (etc) ...
DBIx::Class::Storage::DBI::catch {...} (): DBIx::Class::Storage::DBI::try {...} (): DBI Exception: DBD::SQLite::db do failed: database is locked [for Statement "CREATE INDEX blog_idx_username ON blog (username)"] at t/backend/dbic.t line 56
 (running "CREATE INDEX blog_idx_username ON blog (username)") at t/backend/dbic.t line 56
DBIx::Class::Storage::DBI::_prepare_sth(): DBI Exception: DBD::SQLite::db prepare_cached failed: database is locked [for Statement "INSERT INTO people ( age, contact, email, name, phone) VALUES ( ?, ?, ?, ?, ? )"] at t/backend/dbic.t line 90
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 35 just after 1.
t/backend/dbic.t ............. 
Dubious, test returned 35 (wstat 8960, 0x2300)
All 1 subtests passed 

Probably this could be fixed by requiring a higer File::Temp version --- see https://metacpan.org/source/ETHER/File-Temp-0.2309/Changes#L8-12 for the possible reason.