From 2cd747729a282b50c2a1acf8657f188a05172604 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 9 Oct 2015 13:26:39 +0200 Subject: [PATCH] Bug 14544: [QA Follow-up] Fix warning about transaction When running Virtualshelves.t, you have this warning: DBD::mysql::db begin_work failed: Already in a transaction at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1339. By moving the DBI lines after creating the TestBuilder object, the warning will be gone. Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- t/db_dependent/Virtualshelves.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/Virtualshelves.t b/t/db_dependent/Virtualshelves.t index 42c7ea941d..050de4d29f 100644 --- a/t/db_dependent/Virtualshelves.t +++ b/t/db_dependent/Virtualshelves.t @@ -12,12 +12,12 @@ use Koha::Virtualshelfcontents; use t::lib::TestBuilder; +my $builder = t::lib::TestBuilder->new; + my $dbh = C4::Context->dbh; $dbh->{AutoCommit} = 0; teardown(); -my $builder = t::lib::TestBuilder->new; - subtest 'CRUD' => sub { plan tests => 13; my $patron = $builder->build({ -- 2.39.5