[Bug 16636] New: t/00-load.t warning from C4/External/BakerTaylor.pm
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16636 Bug ID: 16636 Summary: t/00-load.t warning from C4/External/BakerTaylor.pm Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: Test Suite Assignee: mtompset@hotmail.com Reporter: mtompset@hotmail.com QA Contact: gmcharlt@gmail.com Since the tests are expecting an initialize function, the initialize call was just moved outside of the INIT block. TEST PLAN --------- 1) prove t/00-load.t -- warnings about INIT for hbyymmincr 2) prove `git grep -l BakerTaylor | grep [.]t$` -- should all run okay 3) apply patch 4) repeat steps 1 and 2 -- warning should be gone, and everything else run okay 5) run koha qa test tools -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16636 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=14110 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16636 M. Tompsett <mtompset@hotmail.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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16636 --- Comment #1 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 51957 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51957&action=edit Bug 16636: t/00-load.t warning from C4/External/BakerTaylor.pm Since the tests are expecting an initialize function, the initialize call was just moved outside of the INIT block. TEST PLAN --------- 1) prove t/00-load.t -- warnings about INIT for hbyymmincr 2) prove `git grep -l BakerTaylor | grep [.]t$` -- should all run okay 3) apply patch 4) repeat steps 1 and 2 -- warning should be gone, and everything else run okay 5) run koha qa test tools -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16636 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51957|0 |1 is obsolete| | --- Comment #2 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Created attachment 52069 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52069&action=edit [SIGNED-OFF] Bug 16636: t/00-load.t warning from C4/External/BakerTaylor.pm Since the tests are expecting an initialize function, the initialize call was just moved outside of the INIT block. TEST PLAN --------- 1) prove t/00-load.t -- warnings about INIT for hbyymmincr 2) prove `git grep -l BakerTaylor | grep [.]t$` -- should all run okay 3) apply patch 4) repeat steps 1 and 2 -- warning should be gone, and everything else run okay 5) run koha qa test tools Signed-off-by: Srdjan <srdjan@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16636 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hector.hecaxmmx@gmail.com --- Comment #3 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- Srdjan, do you forget to change bug status? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16636 Florent Mara <florent.mara@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |florent.mara@gmail.com --- Comment #4 from Florent Mara <florent.mara@gmail.com> --- I followed the test plan and got the following. Before applying the patch, prove t/00-load.t would output the following t/00-load.t .. 1/? Too late to run INIT block at /var/koha/Koha/C4/Barcodes/hbyymmincr.pm line 41. Too late to run INIT block at /var/koha/Koha/C4/External/BakerTaylor.pm line 42. After applying the patch, it would still output 1 warning while the comment appears to indicate there should be no warnings. t/00-load.t .. 7/? Too late to run INIT block at /var/koha/Koha/C4/Barcodes/hbyymmincr.pm line 41. t/00-load.t .. ok All tests successful. Since the patch focuses on warning from BakerTaylor.pm, I assume it achieves its goal, maybe then the test plan needs to be updated. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16636 --- Comment #5 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Florent Mara from comment #4)
I followed the test plan and got the following.
Before applying the patch, prove t/00-load.t would output the following t/00-load.t .. 1/? Too late to run INIT block at /var/koha/Koha/C4/Barcodes/hbyymmincr.pm line 41. Too late to run INIT block at /var/koha/Koha/C4/External/BakerTaylor.pm line 42.
After applying the patch, it would still output 1 warning while the comment appears to indicate there should be no warnings. t/00-load.t .. 7/? Too late to run INIT block at /var/koha/Koha/C4/Barcodes/hbyymmincr.pm line 41. t/00-load.t .. ok All tests successful.
Since the patch focuses on warning from BakerTaylor.pm, I assume it achieves its goal, maybe then the test plan needs to be updated.
Yes, the test plan was a cut-and-paste mistake by me. It should be TEST PLAN --------- 1) prove t/00-load.t -- warnings about INIT for BakerTaylor 2) prove `git grep -l BakerTaylor | grep [.]t$` -- should all run okay 3) apply patch 4) repeat steps 1 and 2 -- warning should be gone, and everything else run okay 5) run koha qa test tools -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16636 Florent Mara <florent.mara@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #6 from Florent Mara <florent.mara@gmail.com> --- Then it is good for me. :-) The patch behaves as described in the test plan and fixes the warning from BakerTaylor.pm -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16636 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #52069|0 |1 is obsolete| | --- Comment #7 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 52104 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52104&action=edit [SIGNED-OFF] Bug 16636: t/00-load.t warning from C4/External/BakerTaylor.pm Since the tests are expecting an initialize function, the initialize call was just moved outside of the INIT block. TEST PLAN --------- 1) prove t/00-load.t -- warnings about INIT for BakerTaylor 2) prove `git grep -l BakerTaylor | grep [.]t$` -- should all run okay 3) apply patch 4) repeat steps 1 and 2 -- warning should be gone, and everything else run okay 5) run koha qa test tools Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Florent Mara <florent.mara@gmail.com> NOTE: Tweaked test plan based on comment #4, Added sign off based on comment #6. Current status: Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16636 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- We will get rid of the warning, but the it won't make it works correctly under Plack. I may be better to keep the warning to tell something is wrong in this area and need to be fixed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16636 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16636 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #52104|0 |1 is obsolete| | --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 52213 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52213&action=edit Bug 16636: t/00-load.t warning from C4/External/BakerTaylor.pm Since the tests are expecting an initialize function, the initialize call was just moved outside of the INIT block. TEST PLAN --------- 1) prove t/00-load.t -- warnings about INIT for BakerTaylor 2) prove `git grep -l BakerTaylor | grep [.]t$` -- should all run okay 3) apply patch 4) repeat steps 1 and 2 -- warning should be gone, and everything else run okay 5) run koha qa test tools Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Florent Mara <florent.mara@gmail.com> NOTE: Tweaked test plan based on comment #4, Added sign off based on comment #6. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16636 --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 52214 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52214&action=edit Bug 16636: [QA Follow-up] Make BakerTaylor plack safe Initialize file level lexicals each call. Do not call _initialize outside the module. Adjust test by mocking preferences. Test plan: Run t/db_dependent/External_BakerTaylor.t. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Tested module with trivial script under Plack/memcached by toggling the associated preferences. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16636 --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 52215 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52215&action=edit Bug 16636: [QA Follow-up] Move External_BakerTaylor.t to t When we mock the preferences completely now, we do not need db access anymore. Test plan: Run the test without exporting KOHA_CONF. The test passes with some warns about koha-conf.xml. If you point KOHA_CONF to etc/koha-conf.xml, you have no warns. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16636 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|gmcharlt@gmail.com |m.de.rooy@rijksmuseum.nl CC| |m.de.rooy@rijksmuseum.nl Patch complexity|Trivial patch |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16636 --- Comment #12 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 52253 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52253&action=edit Bug 16636 [QA Followup] - Move tests to t/External -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16636 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #13 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 16.11, thanks Mark, Marcell! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16636 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #14 from Frédéric Demians <frederic@tamil.fr> --- Pushed in 16.05. Will be in 16.05.01. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16636 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com Status|Pushed to Master |Pushed to Stable --- Comment #15 from Julian Maurice <julian.maurice@biblibre.com> --- Patch pushed to 3.22.x, will be in 3.22.8 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16636 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com --- Comment #16 from Nick Clemens <nick@bywatersolutions.com> --- *** Bug 16342 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org