Bug 24200 - Borrower_PrevCheckout.t failing randomly
Summary: Borrower_PrevCheckout.t 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-10 10:46 UTC by Jonathan Druart
Modified: 2020-11-30 21:47 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:
20.05.00, 19.11.05, 19.05.10


Attachments
Bug 24200: Try to fix random failures from Borrower_PrevCheckout.t (1.50 KB, patch)
2020-01-10 10:49 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24200: (follow-up) Try to fix random failures from Borrower_PrevCheckout.t (1.58 KB, patch)
2020-03-18 12:44 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-12-10 10:46:50 UTC
Cannot recreate this one locally, it's failing on Koha_Master_D9_MDB_Latest (run 5)

koha_1       | DBIC result _type  isn't of the _type BiblioMetadata at /kohadevbox/koha/Koha/Patron.pm line 618.
koha_1       | # Looks like your test exited with 11 just after 58.
koha_1       | [15:56:22] t/db_dependent/Patron/Borrower_PrevCheckout.t

Certainly a problem of missing data in tests.

A guess, the following line should use build_sample_item:
  248 my $item_d = $builder->build({source => 'Item'})
Comment 1 Jonathan Druart 2020-01-10 10:44:47 UTC
Got it again today on Koha_Master_D9_My8 (run 68)
Comment 2 Jonathan Druart 2020-01-10 10:49:12 UTC
Created attachment 97182 [details] [review]
Bug 24200: Try to fix random failures from Borrower_PrevCheckout.t

It failed inconsistently, let's try to use build_sample_item and see if
it fixes the random failures.

Test plan:
 % prove t/db_dependent/Patron/Borrower_PrevCheckout.t
must return green
Comment 3 Jonathan Druart 2020-01-10 10:49:33 UTC
Sending to the QA queue.
Comment 4 Martin Renvoize 2020-01-10 10:53:22 UTC
Trivial fix, Passing QA and Pushing
Comment 5 Martin Renvoize 2020-01-10 10:57:33 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 6 Joy Nelson 2020-01-30 23:55:36 UTC
Pushed to 19.11.x branch for 19.11.03
Comment 7 Jonathan Druart 2020-02-03 14:53:34 UTC
Not fixed it seems :-/

Koha_Master_D8 (run 661)

koha_1       | DBIC result _type  isn't of the _type BiblioMetadata at /kohadevbox/koha/Koha/Patron.pm line 621.
koha_1       | # Looks like your test exited with 255 just after 58.
koha_1       | [12:01:25] t/db_dependent/Patron/Borrower_PrevCheckout.t ........................... 
koha_1       | Dubious, test returned 255 (wstat 65280, 0xff00)
koha_1       | Failed 2/60 subtests
Comment 8 Joy Nelson 2020-02-03 23:47:56 UTC
Reverted from 19.11.03 until fixed.
Comment 9 Jonathan Druart 2020-03-18 11:45:17 UTC
Appeared once again on Koha_Master_D8/759
Comment 10 Jonathan Druart 2020-03-18 12:44:22 UTC
Created attachment 100954 [details] [review]
Bug 24200: (follow-up) Try to fix random failures from Borrower_PrevCheckout.t

2 other occurrences where missing.
Comment 11 Jonathan Druart 2020-03-18 12:45:03 UTC
Martin, can you push the second patch please?
Comment 12 Martin Renvoize 2020-03-18 13:53:12 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 13 Martin Renvoize 2020-03-18 15:45:04 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 14 Martin Renvoize 2020-03-18 16:30:08 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 15 Joy Nelson 2020-04-03 18:40:15 UTC
Backported to 19.11.x for 19.11.05
Comment 16 Lucas Gass 2020-04-13 16:37:23 UTC
backported to 19.05.x for 19.05.10
Comment 17 Hayley Pelham 2020-04-15 00:21:46 UTC
Minor patch will not be backported to 18.11.x series