Bug 24147 - Objects.t is failing randomly
Summary: Objects.t is failing randomly
Status: Pushed to oldoldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 25551
  Show dependency treegraph
 
Reported: 2019-12-03 14:22 UTC by Jonathan Druart
Modified: 2020-09-20 19:01 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.04, 19.11.10, 19.05.15


Attachments
Bug 24147: Don't assume search_related will return ordered values (3.91 KB, patch)
2020-08-20 12:35 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24147: Don't assume search_related will return ordered values (3.98 KB, patch)
2020-08-31 15:22 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 24147: Don't assume search_related will return ordered values (4.03 KB, patch)
2020-08-31 20:29 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2019-12-03 14:22:45 UTC
Not confirmed yet, bug on the newly created job Koha_Master_D9_MDB_Latest, there is the following failure (run 2):

koha_1       |     #   Failed test 'Koha::Objects->search_related should work as expected'
koha_1       |     #   at t/db_dependent/Koha/Objects.t line 145.
koha_1       |     #          got: 'dxdYyUDoA'
koha_1       |     #     expected: 'hJnosHQGlA'
koha_1       | 
koha_1       |     #   Failed test 'Koha::Objects->search_related should work as expected'
koha_1       |     #   at t/db_dependent/Koha/Objects.t line 146.
koha_1       |     #          got: 'hJnosHQGlA'
koha_1       |     #     expected: 'dxdYyUDoA'
koha_1       | 
koha_1       |     #   Failed test 'Koha::Objects->search_related should work as expected'
koha_1       |     #   at t/db_dependent/Koha/Objects.t line 151.
koha_1       |     #          got: 'dxdYyUDoA'
koha_1       |     #     expected: 'hJnosHQGlA'
koha_1       | 
koha_1       |     #   Failed test 'Koha::Objects->search_related should work as expected'
koha_1       |     #   at t/db_dependent/Koha/Objects.t line 152.
koha_1       |     #          got: 'hJnosHQGlA'
koha_1       |     #     expected: 'dxdYyUDoA'
koha_1       |     # Looks like you failed 4 tests of 8.
koha_1       | 
koha_1       | #   Failed test 'search_related'
koha_1       | #   at t/db_dependent/Koha/Objects.t line 153.
koha_1       | # Looks like you failed 1 test of 17.
koha_1       | [19:23:01] t/db_dependent/Koha/Objects.t 


I do not recreate it locally, even after several restart of the db container.
Comment 1 Jonathan Druart 2020-05-20 12:48:06 UTC
I think this has been fixed, it did not reappeared.
Comment 2 Jonathan Druart 2020-05-22 14:02:35 UTC
Master_U18 #799

15:20:29 koha_1       |     #   Failed test 'Koha::Objects->search_related should work as expected'
15:20:29 koha_1       |     #   at t/db_dependent/Koha/Objects.t line 148.
15:20:29 koha_1       |     #          got: 'Jj0uPsF0y'
15:20:29 koha_1       |     #     expected: 'p_qV3ggA'
15:20:29 koha_1       | 
15:20:29 koha_1       |     #   Failed test 'Koha::Objects->search_related should work as expected'
15:20:29 koha_1       |     #   at t/db_dependent/Koha/Objects.t line 149.
15:20:29 koha_1       |     #          got: 'p_qV3ggA'
15:20:29 koha_1       |     #     expected: 'Jj0uPsF0y'
15:20:29 koha_1       | 
15:20:29 koha_1       |     #   Failed test 'Koha::Objects->search_related should work as expected'
15:20:29 koha_1       |     #   at t/db_dependent/Koha/Objects.t line 154.
15:20:29 koha_1       |     #          got: 'Jj0uPsF0y'
15:20:29 koha_1       |     #     expected: 'p_qV3ggA'
15:20:29 koha_1       | 
15:20:29 koha_1       |     #   Failed test 'Koha::Objects->search_related should work as expected'
15:20:29 koha_1       |     #   at t/db_dependent/Koha/Objects.t line 155.
15:20:29 koha_1       |     #          got: 'p_qV3ggA'
15:20:29 koha_1       |     #     expected: 'Jj0uPsF0y'
15:20:29 koha_1       |     # Looks like you failed 4 tests of 8.
15:20:29 koha_1       | 
15:20:29 koha_1       | #   Failed test 'search_related'
15:20:29 koha_1       | #   at t/db_dependent/Koha/Objects.t line 156.
15:21:05 koha_1       | # Looks like you failed 1 test of 23.
15:21:05 koha_1       | [13:21:05] t/db_dependent/Koha/Objects.t
Comment 3 Jonathan Druart 2020-06-25 08:36:07 UTC
19.11_D9 #193

01:35:33 koha_1       |     #   Failed test 'Koha::Objects->search_related should work as expected'
01:35:33 koha_1       |     #   at t/db_dependent/Koha/Objects.t line 152.
01:35:33 koha_1       |     #          got: 'q_H6M1k'
01:35:33 koha_1       |     #     expected: 'qqXKWFD1GF'
01:35:33 koha_1       | 
01:35:33 koha_1       |     #   Failed test 'Koha::Objects->search_related should work as expected'
01:35:33 koha_1       |     #   at t/db_dependent/Koha/Objects.t line 153.
01:35:33 koha_1       |     #          got: 'qqXKWFD1GF'
01:35:33 koha_1       |     #     expected: 'q_H6M1k'
01:35:33 koha_1       | 
01:35:33 koha_1       |     #   Failed test 'Koha::Objects->search_related should work as expected'
01:35:33 koha_1       |     #   at t/db_dependent/Koha/Objects.t line 158.
01:35:33 koha_1       |     #          got: 'q_H6M1k'
01:35:33 koha_1       |     #     expected: 'qqXKWFD1GF'
01:35:33 koha_1       | 
01:35:33 koha_1       |     #   Failed test 'Koha::Objects->search_related should work as expected'
01:35:33 koha_1       |     #   at t/db_dependent/Koha/Objects.t line 159.
01:35:33 koha_1       |     #          got: 'qqXKWFD1GF'
01:35:33 koha_1       |     #     expected: 'q_H6M1k'
01:35:33 koha_1       |     # Looks like you failed 4 tests of 8.
01:35:33 koha_1       | 
01:35:33 koha_1       | #   Failed test 'search_related'
01:35:33 koha_1       | #   at t/db_dependent/Koha/Objects.t line 160.
01:35:43 koha_1       | # Looks like you failed 1 test of 17.
01:35:43 koha_1       | [23:35:43] t/db_dependent/Koha/Objects.t
Comment 4 Jonathan Druart 2020-08-19 05:54:58 UTC
Koha_Master_U16 #45 (Docker_1) - 10.1.46-MariaDB-1~bionic
Comment 5 Jonathan Druart 2020-08-20 09:36:26 UTC
From yesterday, 19.05_U18 #274 (Docker_4)
Comment 6 Jonathan Druart 2020-08-20 12:35:08 UTC
Created attachment 108735 [details] [review]
Bug 24147: Don't assume search_related will return ordered values

This test is failing randomly because it assume the order is always the
same. But it's not.

Note: Koha::Objects->search_related is never used , last use removed from
  commit 9aa724cdf29a57bc91e42b240b5bcd19e3814ada
  Bug 19599: Speed anonymise_issue_history up
We should keep it however IMO
Comment 7 Kyle M Hall 2020-08-31 15:22:27 UTC
Created attachment 109371 [details] [review]
Bug 24147: Don't assume search_related will return ordered values

This test is failing randomly because it assume the order is always the
same. But it's not.

Note: Koha::Objects->search_related is never used , last use removed from
  commit 9aa724cdf29a57bc91e42b240b5bcd19e3814ada
  Bug 19599: Speed anonymise_issue_history up
We should keep it however IMO

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 8 Katrin Fischer 2020-08-31 20:29:52 UTC
Created attachment 109381 [details] [review]
Bug 24147: Don't assume search_related will return ordered values

This test is failing randomly because it assume the order is always the
same. But it's not.

Note: Koha::Objects->search_related is never used , last use removed from
  commit 9aa724cdf29a57bc91e42b240b5bcd19e3814ada
  Bug 19599: Speed anonymise_issue_history up
We should keep it however IMO

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Jonathan Druart 2020-09-02 13:35:54 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 10 Lucas Gass 2020-09-04 21:54:44 UTC
backported to 20.05.x for 20.05.04
Comment 11 Aleisha Amohia 2020-09-10 04:59:27 UTC
backported to 19.11.x for 19.11.10
Comment 12 Victor Grousset/tuxayo 2020-09-20 19:01:51 UTC
Backported to 19.05.x branch for 19.05.15