Bug 31920 - Unit test t/db_dependent/Holds.t leaves behind database cruft
Summary: Unit test t/db_dependent/Holds.t leaves behind database cruft
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Kyle M Hall
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on: 30447
Blocks:
  Show dependency treegraph
 
Reported: 2022-10-21 15:29 UTC by Kyle M Hall
Modified: 2023-12-28 20:44 UTC (History)
5 users (show)

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


Attachments
Bug 31920: Add transaction to subtest in t/db_dependent/Holds.t (1.76 KB, patch)
2022-10-21 15:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 31920: Add transaction to subtest in t/db_dependent/Holds.t (1.81 KB, patch)
2022-10-21 19:38 UTC, David Nind
Details | Diff | Splinter Review
Bug 31920: Add transaction to subtest in t/db_dependent/Holds.t (1.87 KB, patch)
2022-10-22 09:45 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2022-10-21 15:29:49 UTC
Test Plan:
1) SELECT branchcode FROM branches
2) prove t/db_dependent/Holds.t
3) SELECT branchcode FROM branches
Comment 1 Kyle M Hall 2022-10-21 15:33:22 UTC
Created attachment 142409 [details] [review]
Bug 31920: Add transaction to subtest in t/db_dependent/Holds.t

A subest in t/db_dependent/Holds.t leaves behind database cruft.

Test Plan:
Using koha-testing-docker:
1) SELECT branchcode FROM branches
2) prove t/db_dependent/Holds.t
3) SELECT branchcode FROM branches
   Note cruft
4) reset_all
2) prove t/db_dependent/Holds.t
3) SELECT branchcode FROM branches
   No cruft!
Comment 2 David Nind 2022-10-21 19:38:53 UTC
Created attachment 142442 [details] [review]
Bug 31920: Add transaction to subtest in t/db_dependent/Holds.t

A subest in t/db_dependent/Holds.t leaves behind database cruft.

Test Plan:
Using koha-testing-docker:
1) SELECT branchcode FROM branches
2) prove t/db_dependent/Holds.t
3) SELECT branchcode FROM branches
   Note cruft
4) reset_all
2) prove t/db_dependent/Holds.t
3) SELECT branchcode FROM branches
   No cruft!

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2022-10-21 19:40:45 UTC
Testing notes:

- Step 4.5: Apply patch
Comment 4 Katrin Fischer 2022-10-22 09:45:05 UTC
Thanks a lot Kyle :)
Comment 5 Katrin Fischer 2022-10-22 09:45:49 UTC
Created attachment 142450 [details] [review]
Bug 31920: Add transaction to subtest in t/db_dependent/Holds.t

A subest in t/db_dependent/Holds.t leaves behind database cruft.

Test Plan:
Using koha-testing-docker:
1) SELECT branchcode FROM branches
2) prove t/db_dependent/Holds.t
3) SELECT branchcode FROM branches
   Note cruft
4) reset_all
2) prove t/db_dependent/Holds.t
3) SELECT branchcode FROM branches
   No cruft!

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Tomás Cohen Arazi 2022-10-24 14:11:45 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 7 Lucas Gass 2022-12-05 21:35:58 UTC
Backported to 22.05.x for upcoming 22.05.08
Comment 8 Arthur Suzuki 2022-12-16 13:43:33 UTC
applied to 21.11 for 21.11.15
Comment 9 wainuiwitikapark 2023-03-15 00:59:21 UTC
Not backported to 21.05.x