Bug 32650 - Koha/Holds.t is failing randomly
Summary: Koha/Holds.t is failing randomly
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 25551
  Show dependency treegraph
 
Reported: 2023-01-17 15:30 UTC by Jonathan Druart
Modified: 2024-07-04 20:37 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.02
Circulation function:


Attachments
Bug 32650: Prevent Koha/Holds.t to fail randomly (1.57 KB, patch)
2023-01-18 14:46 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 32650: Prevent Koha/Holds.t to fail randomly (1.62 KB, patch)
2023-01-18 15:07 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 32650: Prevent Koha/Holds.t to fail randomly (1.68 KB, patch)
2023-01-18 16:49 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2023-01-17 15:30:50 UTC
15:36:13 koha_1       |     #   Failed test 'Items 1, 2, and 5 are available for filling the holds'
15:36:13 koha_1       |     #   at t/db_dependent/Koha/Holds.t line 532.
15:36:13 koha_1       |     #     Structures begin differing at:
15:36:13 koha_1       |     #          $got->[0] = '1000'
15:36:13 koha_1       |     #     $expected->[0] = '996'
15:36:13 koha_1       |     # Looks like you failed 1 test of 6.
15:36:13 koha_1       | 
15:36:13 koha_1       | #   Failed test 'get_items_that_can_fill'
15:36:13 koha_1       | #   at t/db_dependent/Koha/Holds.t line 540.

Koha_Master_D10/1002
Comment 1 Jonathan Druart 2023-01-18 08:15:41 UTC
Koha_22.05_U20/130
Comment 2 Jonathan Druart 2023-01-18 14:43:56 UTC
(In reply to Jonathan Druart from comment #1)
> Koha_22.05_U20/130

And it was the exact same numbers!

22:25:51 koha_1       |     #   Failed test 'Items 1, 2, and 5 are available for filling the holds'
22:25:51 koha_1       |     #   at t/db_dependent/Koha/Holds.t line 531.
22:25:51 koha_1       |     #     Structures begin differing at:
22:25:51 koha_1       |     #          $got->[0] = '1000'
22:25:51 koha_1       |     #     $expected->[0] = '996'
22:25:51 koha_1       |     # Looks like you failed 1 test of 6.
22:25:51 koha_1       | 
22:25:51 koha_1       | #   Failed test 'get_items_that_can_fill'
22:25:51 koha_1       | #   at t/db_dependent/Koha/Holds.t line 539.
Comment 3 Jonathan Druart 2023-01-18 14:44:12 UTC
ha... sort...
Comment 4 Jonathan Druart 2023-01-18 14:46:23 UTC Comment hidden (obsolete)
Comment 5 Owen Leonard 2023-01-18 15:07:38 UTC
Created attachment 145397 [details] [review]
Bug 32650: Prevent Koha/Holds.t to fail randomly

22:25:51 koha_1       |     #   Failed test 'Items 1, 2, and 5 are available for filling the holds'
22:25:51 koha_1       |     #   at t/db_dependent/Koha/Holds.t line 531.
22:25:51 koha_1       |     #     Structures begin differing at:
22:25:51 koha_1       |     #          $got->[0] = '1000'
22:25:51 koha_1       |     #     $expected->[0] = '996'
22:25:51 koha_1       |     # Looks like you failed 1 test of 6.
22:25:51 koha_1       |
22:25:51 koha_1       | #   Failed test 'get_items_that_can_fill'
22:25:51 koha_1       | #   at t/db_dependent/Koha/Holds.t line 539.

We need to use a numeric sort, or 1000 is before 996...

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 6 Owen Leonard 2023-01-18 15:10:51 UTC
I'm not able to reproduce the failure but I can confirm that the test passes successfully with the patch.
Comment 7 Martin Renvoize (ashimema) 2023-01-18 16:49:56 UTC
Created attachment 145402 [details] [review]
Bug 32650: Prevent Koha/Holds.t to fail randomly

22:25:51 koha_1       |     #   Failed test 'Items 1, 2, and 5 are available for filling the holds'
22:25:51 koha_1       |     #   at t/db_dependent/Koha/Holds.t line 531.
22:25:51 koha_1       |     #     Structures begin differing at:
22:25:51 koha_1       |     #          $got->[0] = '1000'
22:25:51 koha_1       |     #     $expected->[0] = '996'
22:25:51 koha_1       |     # Looks like you failed 1 test of 6.
22:25:51 koha_1       |
22:25:51 koha_1       | #   Failed test 'get_items_that_can_fill'
22:25:51 koha_1       | #   at t/db_dependent/Koha/Holds.t line 539.

We need to use a numeric sort, or 1000 is before 996...

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 8 Martin Renvoize (ashimema) 2023-01-18 16:51:45 UTC
Keep up the good work!

Pushed to 23.05.x for the next release
Comment 9 Jacob O'Mara 2023-01-18 17:21:43 UTC
Nice work, thanks everyone!

Pushed to 22.11.x for the next release.