Bug 20721 - Circulation.t keeps failing randomly
Summary: Circulation.t keeps failing randomly
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 19403
Blocks: 25551 21213
  Show dependency treegraph
 
Reported: 2018-05-07 16:15 UTC by Jonathan Druart
Modified: 2020-05-20 12:26 UTC (History)
2 users (show)

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


Attachments
Bug 20721: (bug 19403 follow-up) Prevent Circulation.t to fail randomly (3.95 KB, patch)
2018-05-07 16:17 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 2018-05-07 16:15:04 UTC
Now it happens when items.restricted is set to 1:

koha_1       |     #   Failed test 'No error or alert should be raised (error: RESTRICTED) (question: BIBLIO_ALREADY_ISSUED)'
koha_1       |     #   at t/db_dependent/Circulation.t line 1620.
koha_1       |     #          got: '1'
koha_1       |     #     expected: '0'
koha_1       | 
koha_1       |     #   Failed test 'No BIBLIO_ALREADY_ISSUED flag should be set if AllowMultipleIssuesOnABiblio=1 (error: RESTRICTED)'
koha_1       |     #   at t/db_dependent/Circulation.t line 1625.
koha_1       |     #          got: '1'
koha_1       |     #     expected: '0'
koha_1       | 
koha_1       |     #   Failed test 'No BIBLIO_ALREADY_ISSUED flag should be set if it is a subscription (error: RESTRICTED)'
koha_1       |     #   at t/db_dependent/Circulation.t line 1632.
koha_1       |     #          got: '1'
koha_1       |     #     expected: '0'
koha_1       | 
koha_1       |     #   Failed test 'No BIBLIO_ALREADY_ISSUED flag should be set if it is a subscription (error: RESTRICTED)'
koha_1       |     #   at t/db_dependent/Circulation.t line 1636.
koha_1       |     #          got: '1'
koha_1       |     #     expected: '0'
koha_1       |     # Looks like you failed 4 tests of 5.
koha_1       | 
koha_1       | #   Failed test 'CanBookBeIssued + AllowMultipleIssuesOnABiblio'
koha_1       | #   at t/db_dependent/Circulation.t line 1637.
koha_1       | # Looks like you failed 1 test of 116.
koha_1       | [16:00:17] t/db_dependent/Circulation.t ...................................
Comment 1 Jonathan Druart 2018-05-07 16:17:08 UTC
Created attachment 75137 [details] [review]
Bug 20721: (bug 19403 follow-up) Prevent Circulation.t to fail randomly

If items.restricted == 1, CanBookBeIssued will not returned what we are
testing.

The easiest and global fix is to define a default value at TestBuilder
package level

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 2 Jonathan Druart 2018-05-07 16:17:41 UTC
Patch pushed to master for 18.05
Comment 3 Nick Clemens 2018-05-14 21:02:06 UTC
Pushed to stbale for 17.11.06

Awesome work all!
Comment 4 Fridolin Somers 2018-05-22 11:13:23 UTC
Pushed to 17.05.x for v17.05.12