Summary: | Charges/Fees.t is failing on slow servers due to wrong date comparison | ||
---|---|---|---|
Product: | Koha | Reporter: | Victor Grousset/tuxayo <victor> |
Component: | Test Suite | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | aleisha, jonathan.druart, lucas |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24417 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
20.11.00, 20.05.03, 19.11.09, 19.05.15
|
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 25551 | ||
Attachments: | Bug 25729: Prevent Charges/Fees.t to fail on slow server |
Description
Victor Grousset/tuxayo
2020-06-12 16:31:55 UTC
Jonathan Druart: > 201 is( $fees->from_date, dt_from_string(), > 202 'from_date default set correctly to today' ); > > It can be fixed using t::lib::Dates::compare [...] > it's the comparaison of 2 datetimes that have not been init at the same time we assume there are both init in the same second, but that's wrong the method in t::lib::Dates deals with that comparaison correctly Confirmed on master! After 1322 runs: t/db_dependent/Koha/Charges/Fees.t .. 2/8 # Failed test 'from_date default set correctly to today' # at t/db_dependent/Koha/Charges/Fees.t line 201. # got: '2020-06-12T16:49:33' # expected: '2020-06-12T16:49:34' # Looks like you failed 1 test of 9. # Failed test 'new' # at t/db_dependent/Koha/Charges/Fees.t line 203. Created attachment 107416 [details] [review] Bug 25729: Prevent Charges/Fees.t to fail on slow server We must use t::lib::Dates::compare to compare dates Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Pushed to master for 20.11, thanks to everybody involved! Thanks a lot Jonathan! backported to 20.05.x for 20.05.03 backported to 19.11.x for 19.11.09 Backported to 19.05.x branch for 19.05.15 |