Bugzilla – Attachment 142450 Details for
Bug 31920
Unit test t/db_dependent/Holds.t leaves behind database cruft
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31920: Add transaction to subtest in t/db_dependent/Holds.t
Bug-31920-Add-transaction-to-subtest-in-tdbdepende.patch (text/plain), 1.87 KB, created by
Katrin Fischer
on 2022-10-22 09:45:49 UTC
(
hide
)
Description:
Bug 31920: Add transaction to subtest in t/db_dependent/Holds.t
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2022-10-22 09:45:49 UTC
Size:
1.87 KB
patch
obsolete
>From af2480f0e13d6ed3c09e725fed8662eac7e8ec57 Mon Sep 17 00:00:00 2001 >From: Kyle Hall <kyle@bywatersolutions.com> >Date: Fri, 21 Oct 2022 11:31:09 -0400 >Subject: [PATCH] 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> >--- > t/db_dependent/Holds.t | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Holds.t b/t/db_dependent/Holds.t >index 6f87d43533..3ed6e72f09 100755 >--- a/t/db_dependent/Holds.t >+++ b/t/db_dependent/Holds.t >@@ -1709,6 +1709,9 @@ subtest 'ModReserve can only update expirationdate for found holds' => sub { > > subtest 'Koha::Holds->get_items_that_can_fill returns items with datecancelled or (inclusive) datearrived' => sub { > plan tests => 8; >+ >+ $schema->storage->txn_begin; >+ > # biblio item with date arrived and date cancelled > my $biblio1 = $builder->build_sample_biblio(); > my $item1 = $builder->build_sample_item({ biblionumber => $biblio1->biblionumber }); >@@ -1795,4 +1798,6 @@ subtest 'Koha::Holds->get_items_that_can_fill returns items with datecancelled o > is($items_that_can_fill3->count, 1, "Koha::Holds->get_items_that_can_fill returns 1 item with correct parameters"); > is($items_that_can_fill4->next, undef, "Koha::Holds->get_items_that_can_fill doesn't return item with undefined datearrived and undefined datecancelled"); > is($items_that_can_fill4->count, 0, "Koha::Holds->get_items_that_can_fill returns 0 item"); >-} >+ >+ $schema->storage->txn_rollback; >+}; >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 31920
:
142409
|
142442
| 142450