Skip Menu |

This queue is for tickets about the DBIx-Class-ResultSet-RecursiveUpdate CPAN distribution.

Report information
The Basics
Id: 101764
Status: open
Priority: 0/
Queue: DBIx-Class-ResultSet-RecursiveUpdate

People
Owner: Nobody in particular
Requestors: ether [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: tests do not run in parallel
The tests do not cleanly run in parallel (e.g. when HARNESS_OPTIONS=j9, or when running prove -Mblib -j9 t, etc): # Update foreign key with an updated primary key (similar to "Create foreign key col obj including PK" in 96multi_create.t) # The same as the last test, but on a relationship with accessor "single". t/belongs_to_including_pks.t ... ok DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::SQLite::st execute failed: database is locked [for Statement "INSERT INTO tag ( name) VALUES ( ? )"] at t/update_introspectable_m2m.t line 117 # Tests were run but no plan was declared and done_testing() was not seen. # Looks like your test exited with 11 just after 12. t/update_introspectable_m2m.t .. Dubious, test returned 11 (wstat 2816, 0xb00) Each test should obtain a database lock before proceeding, to ensure that each test does not interfere with another.
Can you please supply a patch or at least example code on how to lock the database to fix this? Thanks!
On 2018-06-15 15:37:57, ABRAXXA wrote: Show quoted text
> Can you please supply a patch or at least example code on how to lock > the database to fix this? Thanks!
A mutex could be used to block each test from starting until previous tests have finished. One way to implement this would be for each test to simply create a lock file that it removes when the test completes -- and then each test blocks until the lock file is removed.
Ah, I thought you meant to use some SQL feature for locking! Is there no META attribute which can tell a CPAN client that the test suite doesn't support parallelism?
On 2018-06-15 16:52:37, ABRAXXA wrote: Show quoted text
> Ah, I thought you meant to use some SQL feature for locking! > Is there no META attribute which can tell a CPAN client that the test > suite doesn't support parallelism?
I'm looking into that right now on the #perl-qa channel on irc. There is a rules file that can enforce serialism (and test ordering, etc), but I'm not sure if that's respected by 'make install'.