Bug 24147 - Objects.t is failing randomly
Summary: Objects.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 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: 2022-06-06 20:27 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
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
Comment 13 Jonathan Druart 2021-04-21 07:31:48 UTC
Still failing, U16 run 263 on Docker_2

17:29:23 koha_1       |     #   Failed test 'Koha::Objects->search_related should work as expected'
17:29:23 koha_1       |     #   at t/db_dependent/Koha/Objects.t line 161.
17:29:23 koha_1       | 
17:29:23 koha_1       |     #   Failed test 'Koha::Objects->search_related should work as expected'
17:29:23 koha_1       |     #   at t/db_dependent/Koha/Objects.t line 181.
17:29:23 koha_1       |     # Looks like you failed 2 tests of 6.
17:29:23 koha_1       | 
17:29:23 koha_1       | #   Failed test 'search_related'
17:29:23 koha_1       | #   at t/db_dependent/Koha/Objects.t line 184.
Comment 14 Jonathan Druart 2021-05-03 09:19:05 UTC
Again on U16 run 276 on Docker_6
Comment 15 Jonathan Druart 2021-05-05 07:33:07 UTC
U16 278 Docker_2
Comment 16 Jonathan Druart 2021-05-27 14:12:42 UTC
U_Stable 181, Docker_3
Comment 17 Jonathan Druart 2021-06-04 12:41:51 UTC
Master_U18 1110 Docker_1
Comment 18 Jonathan Druart 2021-06-21 08:05:03 UTC
Master_U_Stable 196 Docker_1
Comment 19 Victor Grousset/tuxayo 2021-07-11 02:23:19 UTC
Koha_20.05_U16 309 Docker_4
https://jenkins.koha-community.org/view/20.05/job/Koha_20.05_U16/309/consoleText

Is that actually an instance of this bug?


koha_1       |     #   Failed test 'Koha::Objects->search_related should work as expected'
koha_1       |     #   at t/db_dependent/Koha/Objects.t line 160.
koha_1       | 
koha_1       |     #   Failed test 'Koha::Objects->search_related should work as expected'
koha_1       |     #   at t/db_dependent/Koha/Objects.t line 180.
koha_1       |     # Looks like you failed 2 tests of 6.
koha_1       | 
koha_1       | #   Failed test 'search_related'
koha_1       | #   at t/db_dependent/Koha/Objects.t line 183.
koha_1       | # Looks like you failed 1 test of 23.
koha_1       | [00:45:47] t/db_dependent/Koha/Objects.t ........................................... 
koha_1       | Dubious, test returned 1 (wstat 256, 0x100)
koha_1       | Failed 1/23 subtests
Comment 20 Jonathan Druart 2021-07-12 08:15:57 UTC
(In reply to Victor Grousset/tuxayo from comment #19)
> Is that actually an instance of this bug?

Yes.
Comment 21 Jonathan Druart 2021-11-04 12:54:40 UTC
Koha_Master_D11_My8/686 Docker_2

13:24:48 koha_1       |     #   Failed test 'Koha::Objects->search_related should work as expected'
13:24:48 koha_1       |     #   at t/db_dependent/Koha/Objects.t line 163.
13:24:48 koha_1       | 
13:24:48 koha_1       |     #   Failed test 'Koha::Objects->search_related should work as expected'
13:24:48 koha_1       |     #   at t/db_dependent/Koha/Objects.t line 183.
13:24:48 koha_1       |     # Looks like you failed 2 tests of 6.
13:24:48 koha_1       | 
13:24:48 koha_1       | #   Failed test 'search_related'
13:24:48 koha_1       | #   at t/db_dependent/Koha/Objects.t line 186.