From 789648aa4cf25d2a94f40ec370c8a4132a9fed13 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 19 Mar 2024 09:16:52 +0100 Subject: [PATCH] Bug 36356: Fix rollback from FrameworkPlugin.t rollback ineffective with AutoCommit enabled at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1651. I have not investigated more than that. Reaching this was already the end of a long road... (see comment 0) Test plan: 0. Do not apply this patch 1. select count(*) from branches Note the value 2. Run prove t/db_dependent/FrameworkPlugin.t => There is a warning 3. Repeat 1. => There are too many libraries! 4. Apply the patch, retry 1, 2, 3 => No warning, no library added by the tests Signed-off-by: Katrin Fischer (cherry picked from commit 1d2165f84106cc27b804ac4c347817d25d1403aa) Signed-off-by: Fridolin Somers --- t/db_dependent/FrameworkPlugin.t | 3 +++ 1 file changed, 3 insertions(+) diff --git a/t/db_dependent/FrameworkPlugin.t b/t/db_dependent/FrameworkPlugin.t index 41baf49153..71a8e3a1f3 100755 --- a/t/db_dependent/FrameworkPlugin.t +++ b/t/db_dependent/FrameworkPlugin.t @@ -18,6 +18,9 @@ use Koha::Util::FrameworkPlugin qw( biblio_008 ); our @includes; GetOptions( 'include=s{,}' => \@includes ); #not used by default ! +# Because of CGI::Session being buggy (see bug 17427) and a use of get_session somewhere here +t::lib::Mocks::mock_preference( 'SessionStorage', 'tmp' ); + my $schema = Koha::Database->new->schema; $schema->storage->txn_begin; our $dbh = C4::Context->dbh; -- 2.39.5