Skip Menu |

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

Report information
The Basics
Id: 92138
Status: resolved
Priority: 0/
Queue: DBIx-Class

People
Owner: Nobody in particular
Requestors: dmn [...] debian.org
Cc:
AdminCc:

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



From: dam [...] cpan.org
Subject: libdbix-class-perl: FTBFS: test failures
DBIx-Class seems to fail some tests with DBD::SQLite 1.40. The following is taken from a bug report about it in Debian (http://bugs.debian.org/735024). I will follow up with a patch that adds support for the new exception text. -->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->--> # Failed test 'Exception propogated properly' # at t/multi_create/standard.t line 447. # expecting: Regexp ((?^:cd.artist may not be NULL)) # found: DBIx::Class::Exception (DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::SQLite::st execute failed: NOT NULL constraint failed: cd.artist [for Statement "INSERT INTO cd ( artist) VALUES ( ? )"] at t/multi_create/standard.t line 446 # ) # Looks like you failed 1 test of 91. t/multi_create/standard.t ........................... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/91 subtests ... # Failed test 'ambiguous find + create failed' # at t/relationship/update_or_create_multi.t line 72. # expecting: Regexp ((?^:cd\.artist\ may\ not\ be\ NULL)) # found: DBIx::Class::Exception (DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::SQLite::st execute failed: NOT NULL constraint failed: cd.artist [for Statement "INSERT INTO cd ( genreid, title, year) VALUES ( ?, ?, ? )"] at t/relationship/update_or_create_multi.t line 68 # ) # Looks like you failed 1 test of 7. t/relationship/update_or_create_multi.t ............. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/7 subtests ... # Failed test 'threw Regexp ((?^s:DBI Exception.+cd\.artist.+NULL))' # at t/storage/error.t line 18. # expecting: Regexp ((?^s:DBI Exception.+cd\.artist.+NULL)) # found: DBIx::Class::Exception (DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::SQLite::st execute failed: NOT NULL constraint failed: cd.artist [for Statement "INSERT INTO cd ( title) VALUES ( ? )"] at t/storage/error.t line 16 # ) # Looks like you failed 1 test of 4. t/storage/error.t ................................... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/4 subtests ... Test Summary Report ------------------- t/52leaks.t (Wstat: 0 Tests: 196 Failed: 0) TODO passed: 8 t/multi_create/standard.t (Wstat: 256 Tests: 91 Failed: 1) Failed test: 87 Non-zero exit status: 1 t/relationship/update_or_create_multi.t (Wstat: 256 Tests: 7 Failed: 1) Failed test: 6 Non-zero exit status: 1 t/storage/error.t (Wstat: 256 Tests: 4 Failed: 1) Failed test: 1 Non-zero exit status: 1 Files=288, Tests=22165, 205 wallclock secs ( 3.49 usr 1.60 sys + 180.62 cusr 18.20 csys = 203.91 CPU) Result: FAIL <--<--<--<--<--<--<--<--<--<--<--<--<--<--<--<--<--<--<--<--
Looks like just a change in the text of the message the test is expecting.
Subject: libdbix-class-perl: test failures with DBD::SQLite 1.40
Show quoted text
> The following is taken from a bug report about it in Debian > (http://bugs.debian.org/735024). > > I will follow up with a patch that adds support for the new exception
Here's the patch.
Subject: sqlite-exceptions.patch
Description: adapt to changes in sqlite3 errors when vialating a NOT NULL constraint Author: Damyan Ivanov <dmn@debian.org> Bug-Debian: https://bugs.debian.org/735024 Bug: https://rt.cpan.org/Ticket/Display.html?id=92138 Forwarded: yes --- a/t/multi_create/standard.t +++ b/t/multi_create/standard.t @@ -444,7 +444,7 @@ throws_ok ( sub { #$t->cd($t->new_related('cd', { artist => undef } ) ); #$t->{_rel_in_storage} = 0; $t->insert; -}, qr/cd.artist may not be NULL/, "Exception propogated properly"); +}, qr/cd.artist may not be NULL|NOT NULL constraint failed: cd.artist/, "Exception propogated properly"); lives_ok ( sub { $schema->resultset('CD')->create ({ --- a/t/relationship/update_or_create_multi.t +++ b/t/relationship/update_or_create_multi.t @@ -69,7 +69,7 @@ throws_ok { year => 2020, title => 'the best thing since sliced bread', }) -} qr/\Qcd.artist may not be NULL/, 'ambiguous find + create failed'; +} qr/\Qcd.artist may not be NULL\E|\QNOT NULL constraint failed: cd.artist/, 'ambiguous find + create failed'; # expect a create, after a failed search using *only* the # *current* relationship and the unique column constraints --- a/t/storage/error.t +++ b/t/storage/error.t @@ -15,7 +15,7 @@ warnings_are ( sub { sub { $schema->resultset('CD')->create({ title => 'vacation in antarctica' }) }, - qr/DBI Exception.+cd\.artist.+NULL/s + qr/DBI Exception.+cd\.artist.+NULL|NOT NULL constraint failed: cd.artist/s ); # as opposed to some other error }, [], 'No warnings besides exception' );
On Tue Jan 14 09:00:40 2014, DAM wrote: Show quoted text
> DBIx-Class seems to fail some tests with DBD::SQLite 1.40. >
This is incorrect - the failing version (where the errors changed) is 1.41_04. This was already patched up couple days ago in https://github.com/dbsrgits/dbix-class/commit/ed5550d36 Thanks for the report in any case. Cheers!