[Bug 13933] New: t/DateUtils.t causes the build to break
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13933 Bug ID: 13933 Summary: t/DateUtils.t causes the build to break Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: blocker Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: robin@catalyst.net.nz QA Contact: gmcharlt@gmail.com DBI connect('dbname=koha;host=localhost;port=3306','kohaadmin',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /usr/share/perl5/DBIx/Connector.pm line 32 Can't call method "do" on unblessed reference at /tmp/buildd/koha-3.19~git+20150331135711.7fa67b2f/blib/PERL_MODULE_DIR/C4/Context.pm line 817. # Looks like you planned 55 tests but ran 4. # Looks like your test exited with 255 just after 4. t/DateUtils.t ....................... This is caused by: commit dd9f456ab7c2f0e66173a6feb7df2a38604c82cd Author: Jonathan Druart <jonathan.druart@biblibre.com> Date: Tue Jan 20 15:28:19 2015 +0100 Bug 13601: Add tests to highlight the problems with DateTime::Format::DateParse -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13933 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=13601 CC| |jonathan.druart@biblibre.co | |m, | |katrin.fischer@bsz-bw.de, | |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13933 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|t/DateUtils.t causes the |t/DateUtils.t causes the |build to break |build to break (from bug | |13601) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13933 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13933 --- Comment #1 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 37400 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37400&action=edit Bug 13933: Fix t/DateUtils.t without DB If the mysql server is not running, the DateUtils.t tests failed. This is caused by commit dd9f456ab7c2f0e66173a6feb7df2a38604c82cd Bug 13601: Add tests to highlight the problems with DateTime::Format::DateParse The pref dateformat and TimeFormat were retrieved before the mock. Before bug 13601, the complete preference method was mocked, that's why the error did not appear. Test plan: sudo service mysql stop prove t/DateUtils.t should be happy -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13933 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|chris@bigballofwax.co.nz |jonathan.druart@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13933 Nicolas Legrand <nicolas.legrand@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13933 Nicolas Legrand <nicolas.legrand@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #37400|0 |1 is obsolete| | --- Comment #2 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- Created attachment 37401 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37401&action=edit Bug 13933: Fix t/DateUtils.t without DB If the mysql server is not running, the DateUtils.t tests failed. This is caused by commit dd9f456ab7c2f0e66173a6feb7df2a38604c82cd Bug 13601: Add tests to highlight the problems with DateTime::Format::DateParse The pref dateformat and TimeFormat were retrieved before the mock. Before bug 13601, the complete preference method was mocked, that's why the error did not appear. Test plan: sudo service mysql stop prove t/DateUtils.t should be happy Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13933 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13933 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #37401|0 |1 is obsolete| | --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 37422 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37422&action=edit [PASSED QA] Bug 13933: Fix t/DateUtils.t without DB If the mysql server is not running, the DateUtils.t tests failed. This is caused by commit dd9f456ab7c2f0e66173a6feb7df2a38604c82cd Bug 13601: Add tests to highlight the problems with DateTime::Format::DateParse The pref dateformat and TimeFormat were retrieved before the mock. Before bug 13601, the complete preference method was mocked, that's why the error did not appear. Test plan: sudo service mysql stop prove t/DateUtils.t should be happy Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13933 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13933 --- Comment #5 from Robin Sheat <robin@catalyst.net.nz> --- Cheers, I had a quick look but I couldn't actually see _why_ it was happening. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13933 Nicolas Legrand <nicolas.legrand@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nicolas.legrand@bulac.fr --- Comment #6 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- Created attachment 37436 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37436&action=edit Reproduce Bug 13933 This patch create subfields that should break when updating DBRev to 3.19.00.006. Here is the ouptut on a 3.18.x box : $ ./reproduce_bug_13933.pl Add subfield 666z and 666Z Try update to DBRev 3.19.00.006 for marc_subfield_structure only DBD::mysql::db do failed: Duplicate entry '666-z' for key 'PRIMARY' at ./reproduce_bug_13933.pl line 29. Remove subfield 666z and 666Z -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13933 --- Comment #7 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- argh sorry wrong bug, is there a way to remove my attachment and comments? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13933 Nicolas Legrand <nicolas.legrand@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #37436|0 |1 is obsolete| | --- Comment #8 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- Comment on attachment 37436 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37436 Reproduce Bug 13933 Make it obsolete, sorry for the noise :( -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13933 --- Comment #9 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Robin Sheat from comment #5)
Cheers, I had a quick look but I couldn't actually see _why_ it was happening.
It's what I tried to explain in the commit description. Before 13601, the C4::Context->preference method was mocked: for all calls, "us" was returned. The patches for 13601 replaced this global mock with a call to t::lib::Mocks::mock_preference, which mocks only the dateformat pref. But somewhere (dt_from_string if I remember correctly) the value for TimeFormat is retrieved. Since it's not mocked, the value in the DB is picked. You know the rest of the story :) -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org