[Koha-bugs] [Bug 19176] Dates comparison fails on slow server
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Oct 13 14:10:52 CEST 2017
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19176
Julian Maurice <julian.maurice at biblibre.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|Signed Off |Failed QA
CC| |julian.maurice at biblibre.com
--- Comment #7 from Julian Maurice <julian.maurice at biblibre.com> ---
t::lib::Dates::compare doesn't trigger a fail if dates differ only in hours,
days, months or years. For instance,
t::lib::Dates::compare('2017-01-01 01:00:00', '2018-02-02 02:00:00') says
ok 1 - (in 0 seconds)
Also, I think t::lib::Dates::compare shouldn't call ok(), because when a test
fails it reports the filename and line where the test failed, and it will
always be t/lib/Dates.pm, line 22, which is not very useful.
IMO it should return -1, 0 or 1 (like DateTime::compare) and should be called
like that:
ok(0 == t::lib::Dates::compare($got, $expected), $description)
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list