[Bug 9486] New: t/Letters.t loads modules in wrong order
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9486 Bug ID: 9486 Summary: t/Letters.t loads modules in wrong order Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: blocker Priority: P5 - low Component: Test Suite Assignee: jcamins@cpbibliography.com Reporter: jcamins@cpbibliography.com Because the unit test t/Letters.t loads C4::Letters before C4::Context, and C4::Letters is not even vaguely thread-safe, the test tends to fail. Usually. Moving the dbh mocking to before the use_ok('C4::Letters') test fixes the problem. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9486 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9486 --- Comment #1 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Created attachment 14831 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14831&action=edit Bug 9486: t/Letters.t loads modules in wrong order Because the unit test t/Letters.t loads C4::Letters before C4::Context, and C4::Letters is not even vaguely thread-safe, the test tends to fail. Usually. Moving the dbh mocking to before the use_ok('C4::Letters') test fixes the problem. To test: 1) Before applying patch, run `prove t/Letters.t` a few times. Note that it fails most of the time, if not all the time. 2) Apply patch. 3) Repeat step (1), noting that now it passes every time. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9486 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz --- Comment #2 from Chris Cormack <chris@bigballofwax.co.nz> --- Before 1..2 DBD::mysql::db do failed: Unknown or incorrect time zone: 'Pacific/Auckland' at C4/Context.pm line 825, <DATA> line 429. ok 1 - use C4::Letters; not ok 2 - HASH ref of ISBN is book # Failed test 'HASH ref of ISBN is book' # at t/Letters.t line 36. # got: undef # expected: 'book' # Looks like you failed 1 test of 2 After 1..2 Name "DBI::errstr" used only once: possible typo at t/Letters.t line 16. ok 1 - use C4::Letters; ok 2 - HASH ref of ISBN is boo -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9486 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #14831|0 |1 is obsolete| | --- Comment #3 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 14835 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14835&action=edit Bug 9486: t/Letters.t loads modules in wrong order Because the unit test t/Letters.t loads C4::Letters before C4::Context, and C4::Letters is not even vaguely thread-safe, the test tends to fail. Usually. Moving the dbh mocking to before the use_ok('C4::Letters') test fixes the problem. To test: 1) Before applying patch, run `prove t/Letters.t` a few times. Note that it fails most of the time, if not all the time. 2) Apply patch. 3) Repeat step (1), noting that now it passes every time. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9486 Chris Cormack <chris@bigballofwax.co.nz> 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=9486 Katrin Fischer <katrin.fischer@bsz-bw.de> 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=9486 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #14835|0 |1 is obsolete| | --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 14839 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14839&action=edit [SIGNED-OFF] Bug 9486: t/Letters.t loads modules in wrong order Because the unit test t/Letters.t loads C4::Letters before C4::Context, and C4::Letters is not even vaguely thread-safe, the test tends to fail. Usually. Moving the dbh mocking to before the use_ok('C4::Letters') test fixes the problem. To test: 1) Before applying patch, run `prove t/Letters.t` a few times. Note that it fails most of the time, if not all the time. 2) Apply patch. 3) Repeat step (1), noting that now it passes every time. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Works as advertised. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9486 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de QA Contact| |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9486 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #5 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This patch has been pushed to master. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9486 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #6 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.10.x will be in 3.10.3 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org