[Bug 18009] New: IssueSlip.t test fails if launched between 00:00 and 00: 59
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18009 Bug ID: 18009 Summary: IssueSlip.t test fails if launched between 00:00 and 00:59 Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: mtj@kohaaloha.com QA Contact: gmcharlt@gmail.com here's an example of the test passing then failing with 2 different dates. ------------------------- vagrant@kohadevbox:~$ sudo date -s 'Sun Jan 29 01:41:55 UTC 2017' Sun Jan 29 01:41:55 GMT 2017 kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ prove t/db_dependent/Members/IssueSlip.t t/db_dependent/Members/IssueSlip.t .. ok All tests successful. Files=1, Tests=3, 3 wallclock secs ( 0.03 usr 0.00 sys + 2.10 cusr 0.12 csys = 2.25 CPU) Result: PASS ------------------------- vagrant@kohadevbox:~$ sudo date -s 'Sun Jan 29 00:41:55 UTC 2017' Sun Jan 29 00:41:55 GMT 2017 kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ prove t/db_dependent/Members/IssueSlip.t t/db_dependent/Members/IssueSlip.t .. # Looks like you planned 2 tests but ran 1. # Failed test 'Hourly loans' # at t/db_dependent/Members/IssueSlip.t line 279. # Looks like you failed 1 test of 3. t/db_dependent/Members/IssueSlip.t .. 1/3 # Failed test 'Issue slip' # at t/db_dependent/Members/IssueSlip.t line 281. The 'hour' parameter ("-1") to DateTime::set did not pass the 'an integer between 0 and 23' callback at /usr/lib/x86_64-linux-gnu/perl5/5.20/DateTime.pm line 1946. DateTime::set(undef, "hour", -1) called at t/db_dependent/Members/IssueSlip.t line 254 main::__ANON__() called at /usr/local/share/perl/5.20.2/Test/Builder.pm line 309 eval {...} called at /usr/local/share/perl/5.20.2/Test/Builder.pm line 309 Test::Builder::subtest(Test::Builder=HASH(0x1cfa9d0), "Hourly loans", CODE(0x85c7ea0)) called at /usr/local/share/perl/5.20.2/Test/More.pm line 807 Test::More::subtest("Hourly loans", CODE(0x85c7ea0)) called at t/db_dependent/Members/IssueSlip.t line 279 main::__ANON__() called at /usr/local/share/perl/5.20.2/Test/Builder.pm line 309 eval {...} called at /usr/local/share/perl/5.20.2/Test/Builder.pm line 309 Test::Builder::subtest(Test::Builder=HASH(0x1cfa9d0), "Issue slip", CODE(0x86031c8)) called at /usr/local/share/perl/5.20.2/Test/More.pm line 807 Test::More::subtest("Issue slip", CODE(0x86031c8)) called at t/db_dependent/Members/IssueSlip.t line 281 # Looks like your test exited with 255 just after 1. t/db_dependent/Members/IssueSlip.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 3/3 subtests Test Summary Report ------------------- t/db_dependent/Members/IssueSlip.t (Wstat: 65280 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 255 Parse errors: Bad plan. You planned 3 tests but ran 1. Files=1, Tests=1, 2 wallclock secs ( 0.02 usr 0.00 sys + 1.79 cusr 0.08 csys = 1.89 CPU) Result: FAIL ------------------------- -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18009 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|chris@bigballofwax.co.nz |mtj@kohaaloha.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18009 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=15029 Depends on| |15029 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15029 [Bug 15029] Tests fail if launched after 23:00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18009 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18009 --- Comment #1 from Mason James <mtj@kohaaloha.com> --- Created attachment 59629 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59629&action=edit Bug 18009 - IssueSlip.t test fails if launched between 00:00 and 00:59 to test patch... 1/ set date between 00:00 and 00:59 $ sudo date -s 'Sun Jan 29 00:41:55 NZDT 2017' 2/ run prove, see fail $ prove -v t/db_dependent/Members/IssueSlip.t ... t/db_dependent/Members/IssueSlip.t (Wstat: 65280 Tests: 1 Failed: 0) Result: FAIL 3/ apply patch 4/ run prove, see pass $ prove -v t/db_dependent/Members/IssueSlip.t ... All tests successful. Result: PASS -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18009 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18009 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18009 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #59629|0 |1 is obsolete| | --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 59695 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59695&action=edit Bug 18009 - IssueSlip.t test fails if launched between 00:00 and 00:59 to test patch... 1/ set date between 00:00 and 00:59 $ sudo date -s 'Sun Jan 29 00:41:55 NZDT 2017' 2/ run prove, see fail $ prove -v t/db_dependent/Members/IssueSlip.t ... t/db_dependent/Members/IssueSlip.t (Wstat: 65280 Tests: 1 Failed: 0) Result: FAIL 3/ apply patch 4/ run prove, see pass $ prove -v t/db_dependent/Members/IssueSlip.t ... All tests successful. Result: PASS NOTE: for code obscurity you could have also done a modulus 24. ;) Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18009 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=18009 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #59695|0 |1 is obsolete| | --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 59727 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59727&action=edit Bug 18009 - IssueSlip.t test fails if launched between 00:00 and 00:59 to test patch... 1/ set date between 00:00 and 00:59 $ sudo date -s 'Sun Jan 29 00:41:55 NZDT 2017' 2/ run prove, see fail $ prove -v t/db_dependent/Members/IssueSlip.t ... t/db_dependent/Members/IssueSlip.t (Wstat: 65280 Tests: 1 Failed: 0) Result: FAIL 3/ apply patch 4/ run prove, see pass $ prove -v t/db_dependent/Members/IssueSlip.t ... All tests successful. Result: PASS NOTE: for code obscurity you could have also done a modulus 24. ;) Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18009 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 17.05, thanks Mason! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18009 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |katrin.fischer@bsz-bw.de --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This patch has been pushed to 16.11.x and will be in 16.11.04. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18009 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #6 from Julian Maurice <julian.maurice@biblibre.com> --- Pushed to 3.22.x for 3.22.17 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org