Bug 31201 - Pseudonymization.t failing if selenium/patrons_search.t failed before
Summary: Pseudonymization.t failing if selenium/patrons_search.t failed before
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: 2022-07-20 15:45 UTC by Jonathan Druart
Modified: 2023-06-08 22:26 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00,21.11, 22.05.05


Attachments
Bug 31201: Prevent Pseudonymization.t to fail (2.36 KB, patch)
2022-07-20 15:46 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 31201: Prevent Pseudonymization.t to fail (2.98 KB, patch)
2022-07-21 05:18 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 31201: Prevent Pseudonymization.t to fail (3.05 KB, patch)
2022-07-21 07:16 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2022-07-20 15:45:14 UTC
Koha_Master/2115

19:52:29 koha_1       | #   Failed test 'No tests run for subtest "PseudonymizedBorrowerAttributes tests"'
19:52:29 koha_1       | #   at t/db_dependent/Koha/Pseudonymization.t line 211.
19:52:29 koha_1       | Duplicate ID# Looks like your test exited with 255 just after 3.
Comment 1 Jonathan Druart 2022-07-20 15:46:19 UTC
Created attachment 137938 [details] [review]
Bug 31201: Prevent Pseudonymization.t to fail

It's failing if selenium/patrons_search.t failed before, they are using
the same code and the selenium tests didn't clean correctly
Comment 2 Tomás Cohen Arazi 2022-07-20 17:45:04 UTC
It is actually failing randomly, with this patch at least:

$ prove t/db_dependent/Koha/Pseudonymization.t
t/db_dependent/Koha/Pseudonymization.t .. 1/3 
    #   Failed test 'Attribute 1 should be retrieved correctly'
    #   at t/db_dependent/Koha/Pseudonymization.t line 201.
    #     Structures begin differing at:
    #          $got->{code} = 'sJHyWk'
    #     $expected->{code} = 'YgXf22O9Vp'

    #   Failed test 'Attribute 2 should be retrieved correctly'
    #   at t/db_dependent/Koha/Pseudonymization.t line 207.
    #     Structures begin differing at:
    #          $got->{attribute} = 'attribute for code1'
    #     $expected->{attribute} = 'attribute for code3'
    # Looks like you failed 2 tests of 3.
t/db_dependent/Koha/Pseudonymization.t .. 3/3 
#   Failed test 'PseudonymizedBorrowerAttributes tests'
#   at t/db_dependent/Koha/Pseudonymization.t line 214.
# Looks like you failed 1 test of 3.
Comment 3 Jonathan Druart 2022-07-21 05:18:29 UTC
Created attachment 137952 [details] [review]
Bug 31201: Prevent Pseudonymization.t to fail

It's failing if selenium/patrons_search.t failed before, they are using
the same code and the selenium tests didn't clean correctly
Comment 4 Martin Renvoize 2022-07-21 07:16:04 UTC
Created attachment 137954 [details] [review]
Bug 31201: Prevent Pseudonymization.t to fail

It's failing if selenium/patrons_search.t failed before, they are using
the same code and the selenium tests didn't clean correctly

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Martin Renvoize 2022-07-21 07:16:39 UTC
The change makes sense to me and makes us a little more future proof by using testbuilder.

Passing QA
Comment 6 Tomás Cohen Arazi 2022-07-21 12:49:35 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 7 Lucas Gass 2022-09-02 14:34:56 UTC
Backported to 22.05.x for 22.05.05
Comment 8 Arthur Suzuki 2022-09-14 12:59:18 UTC
Thanks!

Pushed to 21.11 for 21.11.12
Comment 9 Victor Grousset/tuxayo 2022-09-19 20:16:43 UTC
Not backported to oldoldstable (21.05.x). No recollection of this failing on 21.05.x, will keep in mind if Pseudonymization.t fails.

Nothing to document, resolving