Bug 11457

Summary: t/db_dependent/Bookseller.t can fail when subscription table is not empty
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: Test SuiteAssignee: Chris Cormack <chris>
Status: CLOSED FIXED QA Contact: Galen Charlton <gmcharlt>
Severity: normal    
Priority: P5 - low CC: fridolin.somers
Version: 3.14   
Hardware: All   
OS: All   
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
[SIGNED OFF] Bug 11457 : Clearing subscription table so tests pass correctly
Bug 11457 : Clearing subscription table so tests pass correctly

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.