| Summary: | Tests fail if launched after 23:00 | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
| Component: | Test Suite | Assignee: | Jonathan Druart <jonathan.druart> |
| Status: | CLOSED FIXED | QA Contact: | Galen Charlton <gmcharlt> |
| Severity: | major | ||
| Priority: | P5 - low | CC: | chris, liz, tomascohen |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18009 | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
| Bug Depends on: | |||
| Bug Blocks: | 18009, 21360 | ||
| Attachments: |
Bug 15029: Make the IssueSlip tests pass even if launched after 23:00
Bug 15029: Make the IssueSlip tests pass even if launched after 23:00 [PASSED QA] Bug 15029: Make the IssueSlip tests pass even if launched after 23:00 |
||
Created attachment 43597 [details] [review] Bug 15029: Make the IssueSlip tests pass even if launched after 23:00 Prior to this patch, the tests did not pass if they were launched after 23:00. DateTime complains if you ask for creating a date with hour => 24 (which is logical so far). Test plan: 0/ Don't apply this patch 1/ sudo date -s "2015-10-19 23:50:00";prove t/db_dependent/Members/IssueSlip.t 2/ Apply this patch and repeat 1. Ccing RM & RMaints Created attachment 43629 [details] [review] Bug 15029: Make the IssueSlip tests pass even if launched after 23:00 Prior to this patch, the tests did not pass if they were launched after 23:00. DateTime complains if you ask for creating a date with hour => 24 (which is logical so far). Test plan: 0/ Don't apply this patch 1/ sudo date -s "2015-10-19 23:50:00";prove t/db_dependent/Members/IssueSlip.t 2/ Apply this patch and repeat 1. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 43660 [details] [review] [PASSED QA] Bug 15029: Make the IssueSlip tests pass even if launched after 23:00 Prior to this patch, the tests did not pass if they were launched after 23:00. DateTime complains if you ask for creating a date with hour => 24 (which is logical so far). Test plan: 0/ Don't apply this patch 1/ sudo date -s "2015-10-19 23:50:00";prove t/db_dependent/Members/IssueSlip.t 2/ Apply this patch and repeat 1. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Patch pushed to master. Thanks Jonathan! Pushed to 3.20.x will be in 3.20.5 |
% sudo date -s "2015-10-19 23:50:00";prove t/db_dependent/Members/IssueSlip.t Mon 19 Oct 23:50:00 BST 2015 t/db_dependent/Members/IssueSlip.t .. # Child (Hourly loans) exited without calling finalize() # Failed test 'Hourly loans' # at /home/koha/perl5/lib/perl5/Test/Builder.pm line 276. The 'hour' parameter ("24") to DateTime::set did not pass the 'an integer between 0 and 23' callback at /usr/lib/i386-linux-gnu/perl5/5.20/DateTime.pm line 1944. DateTime::set(undef, "hour", 24) called at t/db_dependent/Members/IssueSlip.t line 200 main::__ANON__() called at /home/koha/perl5/lib/perl5/Test/Builder.pm line 258 Test::Builder::__ANON__() called at /home/koha/perl5/lib/perl5/Test/Builder.pm line 263 eval {...} called at /home/koha/perl5/lib/perl5/Test/Builder.pm line 263 Test::Builder::subtest(Test::Builder=HASH(0x9dd4818), "Hourly loans", CODE(0xd30bc20)) called at /home/koha/perl5/lib/perl5/Test/More.pm line 770 Test::More::subtest("Hourly loans", CODE(0xd30bc20)) called at t/db_dependent/Members/IssueSlip.t line 259 main::__ANON__() called at /home/koha/perl5/lib/perl5/Test/Builder.pm line 258 Test::Builder::__ANON__() called at /home/koha/perl5/lib/perl5/Test/Builder.pm line 263 eval {...} called at /home/koha/perl5/lib/perl5/Test/Builder.pm line 263 Test::Builder::subtest(Test::Builder=HASH(0x9dd4818), "Issue slip", CODE(0xd13eb1c)) called at /home/koha/perl5/lib/perl5/Test/More.pm line 770 Test::More::subtest("Issue slip", CODE(0xd13eb1c)) called at t/db_dependent/Members/IssueSlip.t line 261 # Child (Issue slip) exited without calling finalize() t/db_dependent/Members/IssueSlip.t .. 1/3 # Failed test 'Issue slip' # at /home/koha/perl5/lib/perl5/Test/Builder.pm line 276. # Looks like you planned 3 tests but ran 1. # Looks like you failed 1 test of 1 run. # Looks like your test exited with 29 just after 1. t/db_dependent/Members/IssueSlip.t .. Dubious, test returned 29 (wstat 7424, 0x1d00) Failed 3/3 subtests Test Summary Report ------------------- t/db_dependent/Members/IssueSlip.t (Wstat: 7424 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 29 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.60 cusr 0.04 csys = 1.66 CPU) Result: FAIL