Bug 11457 - t/db_dependent/Bookseller.t can fail when subscription table is not empty
Summary: t/db_dependent/Bookseller.t can fail when subscription table is not empty
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: 3.14
Hardware: All All
: P5 - low normal (vote)
Assignee: Chris Cormack
QA Contact: Galen Charlton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-29 21:11 UTC by Katrin Fischer
Modified: 2015-06-04 23:23 UTC (History)
1 user (show)

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


Attachments
Bug 11457 : Clearing subscription table so tests pass correctly (1.00 KB, patch)
2014-01-02 04:18 UTC, Chris Cormack
Details | Diff | Splinter Review
[SIGNED OFF] Bug 11457 : Clearing subscription table so tests pass correctly (1.16 KB, patch)
2014-01-02 07:11 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 11457 : Clearing subscription table so tests pass correctly (1.22 KB, patch)
2014-01-09 16:43 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 Katrin Fischer 2013-12-29 21:11:15 UTC
Tests 22 and 23 failed on my database because I had a few subscriptions in my database. After setting the subscription.enddate far into the future the tests passed again.

ok 22 - search for subscriptions by expiration date
ok 23 - search for subscriptions by expiration date

Maybe cleaning the subscription table within the transaction before running the test would fix this.
Comment 1 Chris Cormack 2014-01-02 04:13:05 UTC
Yep, if you have an old subscription that ended before 2013-12-31 test 22 will fail. If one is older than 2013-08-15 23 will also fail.
Comment 2 Chris Cormack 2014-01-02 04:18:50 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2014-01-02 07:11:50 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2014-01-09 16:43:29 UTC
Created attachment 24100 [details] [review]
Bug 11457 : Clearing subscription table so tests pass correctly

To test
1/ Add a subscription in the serials module, with an end date before
2013-08-01
2/ run prove -v t/db_dependent/Bookseller.t
   Notice tests 22 and 23 fail
3/ Apply patch
4/ run test again
5/ Notice tests succeed

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tests now clean the subscription table before running
the tests, so that the will always pass.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 5 Galen Charlton 2014-01-09 19:11:27 UTC
Pushed to master.  Thanks, Chris!
Comment 6 Fridolin Somers 2014-02-18 08:46:56 UTC
Patch pushed to 3.14.x, will be in 3.14.4.