Bug 23994 - AdditionalFields.t is failing randomly (U18)
Summary: AdditionalFields.t is failing randomly (U18)
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 25551
  Show dependency treegraph
 
Reported: 2019-11-08 09:27 UTC by Jonathan Druart
Modified: 2021-12-13 21:09 UTC (History)
3 users (show)

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


Attachments
Bug 23994: Fix random failure from AdditionalFields.t (U18) (1.44 KB, patch)
2019-11-08 09:29 UTC, Jonathan Druart
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-11-08 09:27:41 UTC
t/db_dependent/Koha/Objects/Mixin/AdditionalFields.t .. 1/12 
#   Failed test '->additional_field_values should return the correct values'
#   at t/db_dependent/Koha/Objects/Mixin/AdditionalFields.t line 82.
#     Structures begin differing at:
#          $got->[0]{value} = 'bar value for basket2'
#     $expected->[0]{value} = 'foo value for basket2'
# Looks like you failed 1 test of 12.

We do not really know why, but the values are not returned in the order they are stored in DB. Fixing this random failure for now at test level.
Comment 1 Jonathan Druart 2019-11-08 09:29:00 UTC
Created attachment 95187 [details] [review]
Bug 23994: Fix random failure from AdditionalFields.t (U18)

t/db_dependent/Koha/Objects/Mixin/AdditionalFields.t .. 1/12
 #   Failed test '->additional_field_values should return the correct values'
 #   at t/db_dependent/Koha/Objects/Mixin/AdditionalFields.t line 82.
 #     Structures begin differing at:
 #          $got->[0]{value} = 'bar value for basket2'
 #     $expected->[0]{value} = 'foo value for basket2'
 # Looks like you failed 1 test of 12.

We do not really know why, but the values are not returned in the order they are stored in DB. Fixing this random failure for now at test level.
Comment 2 Martin Renvoize (ashimema) 2019-11-08 09:34:32 UTC
As discussed on IRC, this works and gets the tests passing again... no idea why it returns differently on U18 but the order is unimportant in the context anyway.  Passing QA and Pushing.
Comment 3 Lucas Gass (lukeg) 2020-01-09 22:33:29 UTC
I cannot make this fail in 19.05.x, do we need it in that version?
Comment 4 Jonathan Druart 2020-01-10 08:35:17 UTC
(In reply to Lucas Gass from comment #3)
> I cannot make this fail in 19.05.x, do we need it in that version?

Yes, it should fail on U18 as well.
Comment 5 Victor Grousset/tuxayo 2020-06-05 20:41:40 UTC
(In reply to Lucas Gass from comment #3)
> I cannot make this fail in 19.05.x, do we need it in that version?

I have this failing locally often (whereas it seems ok in the CI), it must depend a lot of the machine.

So need in 19.05.x is confirmed.
Comment 6 Victor Grousset/tuxayo 2020-06-06 03:33:31 UTC
Wait it's already in 19.11 since a long time. Great I can backport it :)
Comment 7 Victor Grousset/tuxayo 2020-06-08 20:34:35 UTC
Backported to 19.05.x branch for 19.05.12