From 4de7fe0344968273951d4fb4ce9041765c96bf75 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Fri, 5 Jun 2015 01:07:36 -0400 Subject: [PATCH] Bug 14334: t/db_dependent/Borrower_Files.t AutoCommit fix There is no easy way to trigger an obvious problem. TEST PLAN --------- 1) apply patch 2) git diff origin/master -- Are the additions/subtractions similar to http://paste.lisp.org/display/149194? 3) run koha qa test tools --- t/db_dependent/Borrower_Files.t | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/Borrower_Files.t b/t/db_dependent/Borrower_Files.t index 281cefd..48948e9 100644 --- a/t/db_dependent/Borrower_Files.t +++ b/t/db_dependent/Borrower_Files.t @@ -25,9 +25,12 @@ use C4::Members; use Test::More tests => 23; use_ok('Koha::Borrower::Files'); +use Koha::Database; my $dbh = C4::Context->dbh; -$dbh->{AutoCommit} = 0; +my $database = Koha::Database->new(); +my $schema = $database->schema(); +$schema->storage->txn_begin(); $dbh->{RaiseError} = 1; $dbh->do(q|DELETE FROM issues|); @@ -119,4 +122,4 @@ $bf->DelFile( $files = $bf->GetFilesInfo(); is( @$files, 0, 'DelFile delete a file' ); -$dbh->rollback; +$schema->storage->txn_rollback(); -- 2.1.4