Bug 38526

Summary: Auth_with_* tests fail randomly
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Test SuiteAssignee: Jonathan Druart <jonathan.druart>
Status: Pushed to oldoldstable --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, lucas, pedro.amorim
Version: unspecifiedKeywords: rel_23_05_candidate, rel_23_11_candidate, rel_24_11_candidate
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00,24.05.06,23.11.11
Circulation function:
Bug Depends on: 36822    
Bug Blocks:    
Attachments: Bug 38526: (bug 36822 follow-up): Improve datetime comparison in tests

Description Jonathan Druart 2024-11-25 10:58:56 UTC

    
Comment 1 Jonathan Druart 2024-11-25 11:01:45 UTC
Created attachment 174966 [details] [review]
Bug 38526: (bug 36822 follow-up): Improve datetime comparison in tests

17:39:54 koha_1       |     #   Failed test 'updated_on correctly saved on newly created user'
17:39:54 koha_1       |     #   at t/db_dependent/Auth_with_shibboleth.t line 319.
17:39:54 koha_1       |     #     Structures begin differing at:
17:39:54 koha_1       |     #          $got->[0] = '2024-11-19 16:39:30'
17:39:54 koha_1       |     #     $expected->[0] = '2024-11-19 16:39:29'
17:39:54 koha_1       |     # Looks like you failed 1 test of 54.

We must use t::lib::Dates::compare to compare datetimes in tests.
Comment 2 Katrin Fischer 2024-11-25 11:04:58 UTC
Picking an testing... for main.
Comment 3 Katrin Fischer 2024-11-25 11:05:36 UTC
Hi Pedro, please have a look here!
Comment 4 Lucas Gass (lukeg) 2024-12-05 23:15:38 UTC
Backported to 24.05.x for upcoming 24.05.06
Comment 5 Fridolin Somers 2024-12-18 13:48:30 UTC
Pushed to 23.11.x for 23.11.11