From 30ca02aee836fcb1933b2c671638937c503af31e Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 26 May 2017 11:20:42 +0200 Subject: [PATCH] Bug 18620: [QA Follow-up] Move the final rollback to the very end The new subtest in Reserves.t does not need its own transaction. Move the original rollback to the very end of the test. Signed-off-by: Marcel de Rooy https://bugs.koha-community.org/show_bug.cgi?id=18478 Signed-off-by: Kyle M Hall --- t/db_dependent/Reserves.t | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t index 1a2d33c80b..0d238162a6 100755 --- a/t/db_dependent/Reserves.t +++ b/t/db_dependent/Reserves.t @@ -714,15 +714,10 @@ $cache->clear_from_cache("MarcStructure-1-$frameworkcode"); $cache->clear_from_cache("default_value_for_mod_marc-$frameworkcode"); $cache->clear_from_cache("MarcSubfieldStructure-$frameworkcode"); -# we reached the finish -$schema->storage->txn_rollback(); - subtest '_koha_notify_reserve() tests' => sub { plan tests => 2; - $schema->storage->txn_begin; - my $wants_hold_and_email = { wants_digest => '0', transports => { @@ -790,8 +785,6 @@ subtest '_koha_notify_reserve() tests' => sub { })->next()->to_address(); is($email_message_address, undef ,"We should not populate the hold message with the email address, sending will do so"); - $schema->storage->txn_rollback(); - }; sub count_hold_print_messages { @@ -803,3 +796,6 @@ sub count_hold_print_messages { }); return $message_count->[0]->[0]; } + +# we reached the finish +$schema->storage->txn_rollback(); -- 2.39.5