From c92e45275e0c74b22b6232abe1fb3d95d136d377 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 7 Jan 2020 16:02:36 +0100 Subject: [PATCH] Bug 24150: Prevent random failure comparing updated_on Jenkins is currently failing (slow server, datetime comparison, etc.) koha_1 | # Failed test at t/db_dependent/Koha/Old.t line 48. koha_1 | # Structures begin differing at: koha_1 | # $got->{updated_on} = '2020-01-07 14:15:22' koha_1 | # $expected->{updated_on} = '2020-01-07 14:15:21' koha_1 | # Looks like you failed 1 test of 1. koha_1 | koha_1 | # Failed test 'Koha::Old::Patrons' koha_1 | # at t/db_dependent/Koha/Old.t line 49. koha_1 | # Looks like you failed 1 test of 2. koha_1 | [14:15:22] t/db_dependent/Koha/Old.t ............................................... --- t/db_dependent/Koha/Old.t | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/Koha/Old.t b/t/db_dependent/Koha/Old.t index 36f3e1bbb5..de2b0ba69f 100644 --- a/t/db_dependent/Koha/Old.t +++ b/t/db_dependent/Koha/Old.t @@ -44,8 +44,10 @@ subtest 'Koha::Old::Patrons' => sub { { borrowernumber => $patron->borrowernumber } - )->next; - is_deeply( $deleted_patron->unblessed, $patron_unblessed ); + )->next->unblessed; + delete $deleted_patron->{updated_on}; + delete $patron_unblessed->{updated_on}; + is_deeply( $deleted_patron, $patron_unblessed ); }; subtest 'Koha::Old::Biblios and Koha::Old::Items' => sub { -- 2.11.0