From dae4e8b6491f46ead84c2ca1fe3e02598df4947b Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 22 Sep 2023 14:14:02 +0000 Subject: [PATCH] Bug 34887: Fix transactions in db dependent Patron.t Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 53377edcc7351935f8ff8bec838616479d59e358) Signed-off-by: Fridolin Somers (cherry picked from commit bc36b2318093ccb61eed9e1b8c1fc899d4b350a5) Signed-off-by: Matt Blenkinsop --- t/db_dependent/Koha/Patron.t | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/t/db_dependent/Koha/Patron.t b/t/db_dependent/Koha/Patron.t index 1d445105fd..7ab26ed146 100755 --- a/t/db_dependent/Koha/Patron.t +++ b/t/db_dependent/Koha/Patron.t @@ -1080,6 +1080,8 @@ subtest 'safe_to_delete() tests' => sub { ok( $patron->safe_to_delete, 'Can delete, all conditions met' ); my $messages = $patron->safe_to_delete->messages; is_deeply( $messages, [], 'Patron can be deleted, no messages' ); + + $schema->storage->txn_rollback; }; subtest 'article_request_fee() tests' => sub { @@ -1353,6 +1355,7 @@ subtest 'notify_library_of_registration()' => sub { }; subtest 'update privacy tests' => sub { + $schema->storage->txn_begin; plan tests => 5; @@ -1382,4 +1385,6 @@ subtest 'update privacy tests' => sub { is( $old_checkout->borrowernumber, $anon_patron->id, "Checkout is successfully anonymized"); is( $patron->privacy(), 2, "Patron privacy is successfully updated"); + + $schema->storage->txn_rollback; }; -- 2.39.5