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.
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