Bug 22349 - Overzealous deletion of data in t/db_dependant/Koha/Acquisitions/Booksellers.t
Summary: Overzealous deletion of data in t/db_dependant/Koha/Acquisitions/Booksellers.t
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact: Josef Moravec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-15 14:31 UTC by Martin Renvoize
Modified: 2019-03-01 11:19 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 22349: Remove overzealous database deletions from test (2.44 KB, patch)
2019-02-15 14:43 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 22349: Remove overzealous database deletions from test (2.51 KB, patch)
2019-02-17 14:09 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 22349: Remove overzealous database deletions from test (2.57 KB, patch)
2019-02-18 08:59 UTC, Josef Moravec
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2019-02-15 14:31:25 UTC
We delete stuff when it has no bearing on the test at all as far as I can tell.. we shouldn't do that as all we're doing it adding an unnecessary db load and slowing down the tests.
Comment 1 Martin Renvoize 2019-02-15 14:43:19 UTC
Created attachment 85177 [details] [review]
Bug 22349: Remove overzealous database deletions from test

For no apparent reason a whole lot of data was being deleted inside a
transaction for each of the subtests in Koha/Acquisitions/Booksellers.t

This patch simply remove the deletions. To test, run the test before and
after applying the patch and they should all continue to pass.. If you
have a large number of booksellers, baskets, orders or subscriptions in
your database you may also see an decrease in the time it takes to run
the test.
Comment 2 Jonathan Druart 2019-02-17 14:09:50 UTC
Created attachment 85223 [details] [review]
Bug 22349: Remove overzealous database deletions from test

For no apparent reason a whole lot of data was being deleted inside a
transaction for each of the subtests in Koha/Acquisitions/Booksellers.t

This patch simply remove the deletions. To test, run the test before and
after applying the patch and they should all continue to pass.. If you
have a large number of booksellers, baskets, orders or subscriptions in
your database you may also see an decrease in the time it takes to run
the test.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 3 Josef Moravec 2019-02-18 08:59:47 UTC
Created attachment 85233 [details] [review]
Bug 22349: Remove overzealous database deletions from test

For no apparent reason a whole lot of data was being deleted inside a
transaction for each of the subtests in Koha/Acquisitions/Booksellers.t

This patch simply remove the deletions. To test, run the test before and
after applying the patch and they should all continue to pass.. If you
have a large number of booksellers, baskets, orders or subscriptions in
your database you may also see an decrease in the time it takes to run
the test.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 4 Josef Moravec 2019-02-18 09:00:07 UTC
Good catch
Comment 5 Nick Clemens 2019-02-27 14:19:08 UTC
Awesome work all!

Pushed to master for 19.05