Bug 31920

Summary: Unit test t/db_dependent/Holds.t leaves behind database cruft
Product: Koha Reporter: Kyle M Hall (khall) <kyle>
Component: Architecture, internals, and plumbingAssignee: Kyle M Hall (khall) <kyle>
Status: RESOLVED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: normal    
Priority: P5 - low CC: arthur.suzuki, david, lucas, m.de.rooy, wainuiwitikapark
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:
22.11.00, 22.05.08, 21.11.15
Circulation function:
Bug Depends on: 30447    
Bug Blocks:    
Attachments: Bug 31920: Add transaction to subtest in t/db_dependent/Holds.t
Bug 31920: Add transaction to subtest in t/db_dependent/Holds.t
Bug 31920: Add transaction to subtest in t/db_dependent/Holds.t

Description Kyle M Hall (khall) 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 (khall) 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 (tcohen) 2022-10-24 14:11:45 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 7 Lucas Gass (lukeg) 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 Wainui Witika-Park 2023-03-15 00:59:21 UTC
Not backported to 21.05.x