Bug 14544: [QA Follow-up] Fix warning about transaction
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 9 Oct 2015 11:26:39 +0000 (13:26 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Thu, 5 Nov 2015 13:00:31 +0000 (10:00 -0300)
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 <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
t/db_dependent/Virtualshelves.t

index 42c7ea9..050de4d 100644 (file)
@@ -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({