Summary: | t/db_dependent/Holds.t tests delete data unnecessarily | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
Component: | Test Suite | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | david, lucas |
Version: | Main | ||
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: |
20.11.00
|
|
Circulation function: | |||
Attachments: |
Bug 26462: Don't delete existing data for tests
Bug 26462: Don't delete existing data for tests Bug 26462: Don't delete existing data for tests |
Description
Nick Clemens (kidclamp)
2020-09-15 10:11:00 UTC
(In reply to Nick Clemens from comment #0) > While testing on a larger database I noticed that the CanItemBeReserved / > holds_per_day tests were hanging. It appears this is because they delete all > holds, issues, items, biblios, and circulation rules. > > The tests generate their own itemtype, rules, patrons, and libraries. There > is no need to delete the existing data. Following tests in the file follow the same pattern Created attachment 110097 [details] [review] Bug 26462: Don't delete existing data for tests These tests generate their own items, patrons, and circ rules. Existing system data will not affect the results of the tests. We do not need to delete information. You may be able to notice the difference in speed of tests depending on your system. It should be faster after applying To test: 1 - Before applying patch: prove -v t/db_dependent/Holds.t 2 - It passes 3 - Apply patch 4 - prove -v t/db_dependent/Holds.t 5 - It passes Created attachment 110104 [details] [review] Bug 26462: Don't delete existing data for tests These tests generate their own items, patrons, and circ rules. Existing system data will not affect the results of the tests. We do not need to delete information. You may be able to notice the difference in speed of tests depending on your system. It should be faster after applying To test: 1 - Before applying patch: prove -v t/db_dependent/Holds.t 2 - It passes 3 - Apply patch 4 - prove -v t/db_dependent/Holds.t 5 - It passes Signed-off-by: David Nind <david@davidnind.com> Before patch applied: All tests successful. Files=1, Tests=67, 19 wallclock secs ( 0.04 usr 0.01 sys + 13.94 cusr 1.32 csys = 15.31 CPU) Result: PASS After patch applied: All tests successful. Files=1, Tests=67, 9 wallclock secs ( 0.05 usr 0.01 sys + 7.99 cusr 0.67 csys = 8.72 CPU) Result: PASS Created attachment 110121 [details] [review] Bug 26462: Don't delete existing data for tests These tests generate their own items, patrons, and circ rules. Existing system data will not affect the results of the tests. We do not need to delete information. You may be able to notice the difference in speed of tests depending on your system. It should be faster after applying To test: 1 - Before applying patch: prove -v t/db_dependent/Holds.t 2 - It passes 3 - Apply patch 4 - prove -v t/db_dependent/Holds.t 5 - It passes Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 20.11, thanks to everybody involved! enhancement will not be backported to 20.05.x |