Bugzilla – Attachment 117372 Details for
Bug 26457
DB DeadLock when renewing checkout items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26457: Unit test
Bug-26457-Unit-test.patch (text/plain), 2.11 KB, created by
Marcel de Rooy
on 2021-02-26 10:54:12 UTC
(
hide
)
Description:
Bug 26457: Unit test
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2021-02-26 10:54:12 UTC
Size:
2.11 KB
patch
obsolete
>From 9eb0d73d53ceeffebbcde10ecf8cafb472eeb4c1 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 24 Dec 2020 12:22:49 +0000 >Subject: [PATCH] Bug 26457: Unit test >Content-Type: text/plain; charset=utf-8 > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Circulation.pm | 4 +++- > t/db_dependent/Circulation.t | 7 ++++++- > 2 files changed, 9 insertions(+), 2 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 92e284fa41..021d80a65e 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -3039,8 +3039,10 @@ sub AddRenewal { > AND itemnumber=?" > ); > >+ eval{ > $sth->execute( $datedue->strftime('%Y-%m-%d %H:%M'), $renews, $unseen_renewals, $lastreneweddate, $borrowernumber, $itemnumber ); >- if ( $sth->err ){ >+ }; >+ if( $sth->err ){ > Koha::Exceptions::Checkout::FailedRenewal->throw( > error => 'Update of issue# ' . $issue->issue_id . ' failed with error: ' . $sth->errstr > ); >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 97ca6492e2..8c4d4bf4c4 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -3756,7 +3756,7 @@ subtest 'AddReturn should clear items.onloan for unissued items' => sub { > > subtest 'AddRenewal and AddIssuingCharge tests' => sub { > >- plan tests => 12; >+ plan tests => 13; > > > t::lib::Mocks::mock_preference('item-level_itypes', 1); >@@ -3799,6 +3799,11 @@ subtest 'AddRenewal and AddIssuingCharge tests' => sub { > > # Check the item out > AddIssue( $patron->unblessed, $item->barcode ); >+ >+ throws_ok { >+ AddRenewal( $patron->borrowernumber, $item->itemnumber, $library->id, undef, {break=>"the_renewal"} ); >+ } 'Koha::Exceptions::Checkout::FailedRenewal', 'Exception is thrown when renewal update to issues fails'; >+ > t::lib::Mocks::mock_preference( 'RenewalLog', 0 ); > my $date = output_pref( { dt => dt_from_string(), dateonly => 1, dateformat => 'iso' } ); > my %params_renewal = ( >-- >2.11.0
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 26457
:
114184
|
114185
|
114186
|
114187
|
114190
|
114669
|
114697
|
117227
|
117228
|
117371
| 117372 |
117373
|
117876
|
118647