[Bug 25729] New: Charges/Fees.t is failing randomly due to wrong comparaison
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25729 Bug ID: 25729 Summary: Charges/Fees.t is failing randomly due to wrong comparaison Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: victor@tuxayo.net QA Contact: testopia@bugs.koha-community.org Independent from bug 24417 I was able to get this failure locally after 3100 runs with koha-testing-docker with KOHA_IMAGE=19.05-stretch. It was on 19.05.x but it's expected to happen in master. t/db_dependent/Koha/Charges/Fees.t .. 1/8 # Failed test 'from_date default set correctly to today' # at t/db_dependent/Koha/Charges/Fees.t line 199. # got: '2020-06-12T05:05:16' # expected: '2020-06-12T05:05:17' # Looks like you failed 1 test of 9. t/db_dependent/Koha/Charges/Fees.t .. 2/8 # Failed test 'new' # at t/db_dependent/Koha/Charges/Fees.t line 201. # Looks like you failed 1 test of 8. t/db_dependent/Koha/Charges/Fees.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/8 subtests After 2813 runs, same environment. t/db_dependent/Koha/Charges/Fees.t .. 1/8 # Failed test 'from_date default set correctly to today' # at t/db_dependent/Koha/Charges/Fees.t line 199. # got: '2020-06-12T14:25:18' # expected: '2020-06-12T14:25:19' # Looks like you failed 1 test of 9. t/db_dependent/Koha/Charges/Fees.t .. 2/8 # Failed test 'new' # at t/db_dependent/Koha/Charges/Fees.t line 201. # Looks like you failed 1 test of 8. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25729 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |25551 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25551 [Bug 25551] [OMNIBUS] Some tests are failing randomly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25729 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|chris@bigballofwax.co.nz |victor@tuxayo.net -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25729 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=24417 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25729 --- Comment #1 from Victor Grousset/tuxayo <victor@tuxayo.net> --- 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25729 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Charges/Fees.t is failing |Charges/Fees.t is failing |randomly due to wrong |randomly due to wrong |comparaison |comparison -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25729 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #2 from Victor Grousset/tuxayo <victor@tuxayo.net> --- 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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25729 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25729 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 107416 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107416&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25729 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Status|Needs Signoff |Signed Off Assignee|victor@tuxayo.net |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=25729 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Charges/Fees.t is failing |Charges/Fees.t is failing |randomly due to wrong |on slow servers due to |comparison |wrong date comparison 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=25729 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |20.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25729 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25729 --- Comment #5 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Thanks a lot Jonathan! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25729 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Pushed to master |Pushed to stable Version(s)|20.11.00 |20.11.00, 20.05.03 released in| | --- Comment #6 from Lucas Gass <lucas@bywatersolutions.com> --- backported to 20.05.x for 20.05.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25729 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|20.11.00, 20.05.03 |20.11.00, 20.05.03, released in| |19.11.09 Status|Pushed to stable |Pushed to oldstable CC| |aleisha@catalyst.net.nz --- Comment #7 from Aleisha Amohia <aleisha@catalyst.net.nz> --- backported to 19.11.x for 19.11.09 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25729 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Pushed to oldoldstable Version(s)|20.11.00, 20.05.03, |20.11.00, 20.05.03, released in|19.11.09 |19.11.09, 19.05.15 --- Comment #8 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Backported to 19.05.x branch for 19.05.15 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org