[Bug 14362] New: PEGI 15 Circulation/AgeRestrictionMarkers test fails
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14362 Bug ID: 14362 Summary: PEGI 15 Circulation/AgeRestrictionMarkers test fails Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: mtompset@hotmail.com QA Contact: gmcharlt@gmail.com In C4/Circulation.pm there is a function call to Date_to_Days(Today). This includes/excludes (not sure which) the timezone, which causes a calculation error when trying to run prove t/Circulation/AgeRestrictionMarkers.t -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14362 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|chris@bigballofwax.co.nz |mtompset@hotmail.com Status|NEW |ASSIGNED Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14362 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14362 --- Comment #1 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 39969 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39969&action=edit Bug 14362: PEGI15 Circulation/AgeRestrictionMarkers test fails It is best to test when UTC date is a date in the future compared to your timezone. I'm in Eastern, so right now, I expect this test to fail for another 2.5 hours. TEST PLAN --------- 1) prove t/Circulation/AgeRestrictionMarkers.t -- fails for PEGI 15. 2) Apply patch 3) prove t/Circulation/AgeRestrictionMarkers.t -- works. 4) koha qa test tools -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14362 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14362 --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 39977 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39977&action=edit Bug 14362: Regression tests This should trigger the error. TEST PLAN --------- 1) sudo apt-get install libtime-fake-perl 2) apply test patch 3) prove t/Circulation/AgeRestrictionMarkers.t -- should fail some times. 4) apply fix patch 5) prove t/Circulation/AgeRestrictionMarkers.t -- should work all the time. 6) koha qa test tools. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14362 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #39977|0 |1 is obsolete| | --- Comment #3 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 39978 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39978&action=edit Bug 14362: Regression tests This should trigger the error. If you are in Eastern (UTC -5), it should trigger 4 fails, unless you time it perfectly for on the hour, in which case you may get 5 failures. TEST PLAN --------- 1) sudo apt-get install libtime-fake-perl 2) apply test patch 3) prove t/Circulation/AgeRestrictionMarkers.t -- should fail some times. 4) apply fix patch 5) prove t/Circulation/AgeRestrictionMarkers.t -- should work all the time. 6) koha qa test tools. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14362 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #39969|0 |1 is obsolete| | --- Comment #4 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 39979 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39979&action=edit Bug 14362: PEGI15 Circulation/AgeRestrictionMarkers test fails It is best to test when UTC date is a date in the future compared to your timezone. I'm in Eastern, so right now, I expect this test to fail for another 2.5 hours. TEST PLAN --------- 1) prove t/Circulation/AgeRestrictionMarkers.t -- fails for PEGI 15. 2) Apply patch 3) prove t/Circulation/AgeRestrictionMarkers.t -- works. 4) koha qa test tools -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14362 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #39978|0 |1 is obsolete| | --- Comment #5 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 39980 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39980&action=edit Bug 14362: Regression tests This should trigger the error. Attempting shifting system time zones did not make sense as to the number of failures. TEST PLAN --------- 1) sudo apt-get install libtime-fake-perl 2) apply test patch 3) prove t/Circulation/AgeRestrictionMarkers.t -- should fail some times. 4) apply fix patch 5) prove t/Circulation/AgeRestrictionMarkers.t -- should work all the time. 6) koha qa test tools. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14362 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff --- Comment #6 from M. Tompsett <mtompset@hotmail.com> --- I haven't made sense of the number of failures related to timezone, but it does fail at least once, so that is all that matters in order to prevent regression. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14362 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #39979|0 |1 is obsolete| | --- Comment #7 from Indranil Das Gupta <indradg@gmail.com> --- Created attachment 40111 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40111&action=edit Bug 14362: PEGI15 Circulation/AgeRestrictionMarkers test fails It is best to test when UTC date is a date in the future compared to your timezone. I'm in Eastern, so right now, I expect this test to fail for another 2.5 hours. TEST PLAN --------- 1) prove t/Circulation/AgeRestrictionMarkers.t -- fails for PEGI 15. 2) Apply patch 3) prove t/Circulation/AgeRestrictionMarkers.t -- works. 4) koha qa test tools Test Remarks (without patch) PASS - in my actual timezone i.e. IST (GMT +0530). FAIL - with timezone switched to US/Eastern Test Remarks (patch applied) PASS - in my actual timezone i.e. IST (GMT +0530). PASS - with timezone switched to US/Eastern Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14362 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #39980|0 |1 is obsolete| | --- Comment #8 from Indranil Das Gupta <indradg@gmail.com> --- Created attachment 40112 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40112&action=edit Bug 14362: Regression tests This should trigger the error. Attempting shifting system time zones did not make sense as to the number of failures. TEST PLAN --------- 1) sudo apt-get install libtime-fake-perl 2) apply test patch 3) prove t/Circulation/AgeRestrictionMarkers.t -- should fail some times. 4) apply fix patch 5) prove t/Circulation/AgeRestrictionMarkers.t -- should work all the time. 6) koha qa test tools. Regression test failed without fix patch. Passed with test patch in place. Tested both scenario with multiple timezones. Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14362 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |indradg@gmail.com 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=14362 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m Status|Signed Off |Failed QA --- Comment #9 from Jonathan Druart <jonathan.druart@biblibre.com> --- Could you please detail the issue, I don't get it. You should also add the new deps to C4/Installer/PerlDependencies.pm Isn't it possible to use DateTime? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14362 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40111|0 |1 is obsolete| | --- Comment #10 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 40325 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40325&action=edit Bug 14362: PEGI15 Circulation/AgeRestrictionMarkers test fails It is best to test when UTC date is a date in the future compared to your timezone. I'm in Eastern, so right now, I expect this test to fail for another 2.5 hours. TEST PLAN --------- 1) prove t/Circulation/AgeRestrictionMarkers.t -- fails for PEGI 15. 2) Apply patch 3) prove t/Circulation/AgeRestrictionMarkers.t -- works. 4) koha qa test tools -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14362 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40112|0 |1 is obsolete| | --- Comment #11 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 40326 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40326&action=edit Bug 14362: Regression tests This should trigger the error. Attempting shifting system time zones did not make sense as to the number of failures. Added Time::Fake dependency, if it isn't installed these extra tests don't run. However, a diag message is given about the lacking dependency. TEST PLAN --------- 1) apply test patch 2) sudo dpkg-reconfigure tzdata -- set your system time to GMT 3) prove t/Circulation/AgeRestrictionMarkers.t -- should not fail, even if you change system time to any time. 4) sudo dpkg-reconfigure tzdata -- set your timezone to Eastern 5) sudo date -s"2015-06-18 21:15:00" 6) date -- should be past 9pm Eastern timezone 7) prove t/Circulation/AgeRestrictionMarkers.t -- kaboom! 8) sudo date -s"2015-06-18 12:00:00" 9) date -- should be noon Eastern timezone 10) prove t/Circulation/AgeRestrictionMarkers.t -- success?! Time sensitive tests are bad tests. 11) sudo apt-get install libtime-fake-perl 12) prove t/Circulation/AgetRestrictionMarkers.t -- kaboom! -- changing timezone to anything other than GMT should trigger a kaboom. 13) apply fix patch 14) prove t/Circulation/AgeRestrictionMarkers.t -- should work all the time. 15) koha qa test tools. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14362 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14362 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=11999 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14362 Zeno Tajoli <z.tajoli@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch CC| |z.tajoli@cineca.it -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14362 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |tomascohen@gmail.com --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Mark, the fix looks good, but Test::More provides a convenient syntax for - skipping tests - providing a convenient warning (thus no need for the diag) Take a look here: http://search.cpan.org/~exodist/Test-Simple-1.001014/lib/Test/More.pm#Condit... Look at t/Calendar.t for an example. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14362 Zeno Tajoli <z.tajoli@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|z.tajoli@cineca.it | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14362 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40325|0 |1 is obsolete| | --- Comment #13 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 42163 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42163&action=edit Bug 14362: PEGI15 Circulation/AgeRestrictionMarkers test fails It is best to test when UTC date is a date in the future compared to your timezone. I'm in Eastern, so right now, I expect this test to fail for another 2.5 hours. TEST PLAN --------- 1) prove t/Circulation/AgeRestrictionMarkers.t -- fails for PEGI 15. 2) Apply patch 3) prove t/Circulation/AgeRestrictionMarkers.t -- works. 4) koha qa test tools -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14362 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40326|0 |1 is obsolete| | --- Comment #14 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 42164 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42164&action=edit Bug 14362: Regression tests This should trigger the error. Attempts to shift system time zones did not make sense as to the number of failures. Added Time::Fake dependency, if it isn't installed these extra tests don't run. There is a nice skip message about it. TEST PLAN --------- 1) apply test patch 2) sudo dpkg-reconfigure tzdata -- set your system time to GMT 3) prove t/Circulation/AgeRestrictionMarkers.t -- should not fail, even if you change system time to any time. 4) sudo dpkg-reconfigure tzdata -- set your timezone to Eastern 5) sudo date -s"2015-06-18 21:15:00" 6) date -- should be past 9pm Eastern timezone 7) prove t/Circulation/AgeRestrictionMarkers.t -- kaboom! 8) sudo date -s"2015-06-18 12:00:00" 9) date -- should be noon Eastern timezone 10) prove t/Circulation/AgeRestrictionMarkers.t -- success?! Time sensitive tests are bad tests. 11) sudo apt-get install libtime-fake-perl 12) prove t/Circulation/AgeRestrictionMarkers.t -- kaboom! -- changing timezone to anything other than GMT should trigger a kaboom. 13) apply fix patch 14) prove t/Circulation/AgeRestrictionMarkers.t -- should work all the time. 15) koha qa test tools. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14362 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #42163|0 |1 is obsolete| | --- Comment #15 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 42172 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42172&action=edit Bug 14362: PEGI15 Circulation/AgeRestrictionMarkers test fails It is best to test when UTC date is a date in the future compared to your timezone. I'm in Eastern, so right now, I expect this test to fail for another 2.5 hours. TEST PLAN --------- 1) prove t/Circulation/AgeRestrictionMarkers.t -- fails for PEGI 15 after 9pm. 2) Apply patch 3) prove t/Circulation/AgeRestrictionMarkers.t -- works. 4) koha qa test tools -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14362 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #42164|0 |1 is obsolete| | --- Comment #16 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 42173 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42173&action=edit Bug 14362: Regression tests This should trigger the error. Attempts to shift system time zones did not make sense as to the number of failures. Added Time::Fake dependency, if it isn't installed these extra tests don't run. There is a nice skip message about it. Added License text. TEST PLAN --------- 1) apply test patch 2) sudo dpkg-reconfigure tzdata -- set your system time to GMT (Africa/Abidjan) 3) prove t/Circulation/AgeRestrictionMarkers.t -- should not fail, even if you change system time to any time. 4) sudo dpkg-reconfigure tzdata -- set your timezone to Eastern 5) sudo date -s"2015-06-18 21:15:00" 6) date -- should be past 9pm Eastern timezone 7) prove t/Circulation/AgeRestrictionMarkers.t -- kaboom! 8) sudo date -s"2015-06-18 12:00:00" 9) date -- should be noon Eastern timezone 10) prove t/Circulation/AgeRestrictionMarkers.t -- success?! Time sensitive tests are bad tests. 11) sudo apt-get install libtime-fake-perl 12) prove t/Circulation/AgeRestrictionMarkers.t -- kaboom! -- changing timezone to anything other than GMT should trigger a kaboom. 13) apply fix patch 14) prove t/Circulation/AgeRestrictionMarkers.t -- should work all the time. 15) less t/Circulation/AgeRestrictionMarkers.t -- the license text should be similar to http://wiki.koha-community.org/wiki/Coding_Guidelines#Licence 16) koha qa test tools. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14362 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14362 --- Comment #17 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 42174 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42174&action=edit My test script Just to test all 24 hours. Makes more comprehensive testing easier. :) -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org