From f2b8b2f37a66e733e4f4ec3ab06c66951df134ae Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Wed, 10 Jun 2015 16:34:09 +0000 Subject: [PATCH] Bug 14334: t/db_dependent/Charset.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/Charset.t | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/Charset.t b/t/db_dependent/Charset.t index 9a48aef..beb61fd 100644 --- a/t/db_dependent/Charset.t +++ b/t/db_dependent/Charset.t @@ -5,10 +5,13 @@ use MARC::Record; use C4::Biblio qw( AddBiblio SetFieldMapping GetMarcFromKohaField ); use C4::Context; use C4::Charset qw( SanitizeRecord ); +use Koha::Database; my $dbh = C4::Context->dbh; +my $database = Koha::Database->new(); +my $schema = $database->schema(); +$schema->storage->txn_begin(); $dbh->{RaiseError} = 1; -$dbh->{AutoCommit} = 0; my $frameworkcode = q||; @@ -48,4 +51,4 @@ $record->append_fields( is( $has_been_modified, 1, 'SanitizeRecord: the record has been modified' ); is( $url, $sanitized_record->subfield($url_field, $url_subfield), 'SanitizeRecord: the url has not been modified'); -$dbh->rollback; +$schema->storage->txn_rollback(); -- 2.1.4