[Bug 22446] New: Koha/Patron/Categories.t is failing on March 1st (2019 only?)
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22446 Bug ID: 22446 Summary: Koha/Patron/Categories.t is failing on March 1st (2019 only?) Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org CC: martin.renvoize@ptfs-europe.com Target Milestone: --- koha_1 | # Failed test 'With enrolmentperiod defined and a date given in parameter, ->get_expiry_date should take this date + enrolmentperiod' koha_1 | # at t/db_dependent/Koha/Patron/Categories.t line 80. koha_1 | # got: '-1' koha_1 | # expected: '0' koha_1 | # Looks like you failed 1 test of 5. koha_1 | koha_1 | # Failed test 'get_expiry_date' koha_1 | # at t/db_dependent/Koha/Patron/Categories.t line 86. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22446 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 85952 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85952&action=edit Bug 22446: Add tests to highlight the problem -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22446 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 86011 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=86011&action=edit Bug 22446: Explicitely list what we expect to avoid ambiguity -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22446 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=22443 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- This is a duplicate of bug 22443. However here I suspect a bug in ->get_expiry_date, not a calculation problem in tests. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22446 --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Comment on attachment 86011 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=86011 Bug 22446: Explicitely list what we expect to avoid ambiguity Review of attachment 86011: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=22446&attachment=86011) ----------------------------------------------------------------- ::: t/db_dependent/Koha/Patron/Categories.t @@ +110,3 @@
Time::Fake->offset( $dt->epoch );
+ my $next_month = dt_from_string($date->{next_month}, 'iso');
I think I found that $next_month was not actually used anywhere.. be nice to do a little housekeeping whilst in here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22446 --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I actually prefer hard-coding these dates for tests as you have done here.. our Koha code relies on DateTime maths so by relying on the same DateTime maths in the test we were realistically just testing DateTime against DateTime so wouldn't have picked up breaking changes in the parent library. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22446 --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- *** Bug 22443 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22446 --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- *** Bug 33107 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22446 --- Comment #8 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Today, Feb 29th 2024 t/db_dependent/Koha/Patron/Categories.t .. 1/10 # Failed test 'With enrolmentperiod defined and no parameter, ->get_expiry_date should return today + enrolmentperiod' # at t/db_dependent/Koha/Patron/Categories.t line 88. # got: '-1' # expected: '0' # Looks like you failed 1 test of 7. # Failed test 'get_expiry_date' # at t/db_dependent/Koha/Patron/Categories.t line 103. t/db_dependent/Koha/Patrons/Import.t .. 176/178 # Failed test 'Expiration date is correct with update_dateexpiry = true no dateexpiry in file and update_dateexpiryfromtoday false (i.e. use passed dateenrolled) ' # at t/db_dependent/Koha/Patrons/Import.t line 1202. # got: '2025-08-28' # expected: '2025-08-29' # Looks like you failed 1 test of 3. # Failed test 'test update_dateexpiry when no dateexpiry in file' # at t/db_dependent/Koha/Patrons/Import.t line 1234. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22446 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Koha/Patron/Categories.t is |Koha/Patron/Categories.t is |failing on March 1st (2019 |failing on March 1st (2019 |only?) |only?) and Feb 28th 2024 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22446 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Koha/Patron/Categories.t is |Koha/Patron/Categories.t is |failing on March 1st (2019 |failing on March 1st (2019 |only?) and Feb 28th 2024 |only?) and Feb 29th 2024 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org