Subject: | Tests may fail if multiple test instances are running |
On smoker systems it is not uncommon that a module's test suite is run at the same time for different perl versions. It seems that in this situation the Form-Processor-Model-RDBO test suite may fail, e.g. like this:
Creating new db... at t/lib/NewDB.pm line 29, <DATA> line 1.
DBD::SQLite::st execute failed: UNIQUE constraint failed: artist.name at /opt/perl-5.24.0/lib/site_perl/5.24.0/Rose/DB/Object.pm line 1182, <DATA> line 1.
insert() - DBD::SQLite::st execute failed: UNIQUE constraint failed: artist.name at /opt/perl-5.24.0/lib/site_perl/5.24.0/Rose/DB/Object.pm line 1182, <DATA> line 1.
at t/changes.t line 21.
at t/changes.t line 21.
# Looks like your test exited with 2 just after 1.
t/changes.t ......................
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/3 subtests
Or:
DBD::SQLite::st execute failed: attempt to write a readonly database at /opt/perl-5.22.3-RC5/lib/site_perl/5.22.3/Rose/DB/Object.pm line 1182, <DATA> line 1.
insert() - DBD::SQLite::st execute failed: attempt to write a readonly database at /opt/perl-5.22.3-RC5/lib/site_perl/5.22.3/Rose/DB/Object.pm line 1182, <DATA> line 1.
at t/update-many-to-one.t line 21.
at t/update-many-to-one.t line 21.
# Looks like your test exited with 2 before it could output anything.
t/update-many-to-one.t ...........
Dubious, test returned 2 (wstat 512, 0x200)
Failed 3/3 subtests
Problem is probably caused by using the same database file for all instances. I found the following in DB.pm:
File::Spec->catfile( File::Spec->tmpdir, 'form-processor-model-rdbo.db' )
This should be changed to use a unique temporary file or directory, e.g. by using File::Temp::tempdir().