Bugzilla – Attachment 176895 Details for
Bug 38744
Tests in Koha/Biblio.t are not rolling back
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38744: Add more missing txn
Bug-38744-Add-more-missing-txn.patch (text/plain), 2.16 KB, created by
Jonathan Druart
on 2025-01-22 10:25:30 UTC
(
hide
)
Description:
Bug 38744: Add more missing txn
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-01-22 10:25:30 UTC
Size:
2.16 KB
patch
obsolete
>From 3e127bf8a226657dce65e73363860c3cb0d7a400 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 22 Jan 2025 11:24:53 +0100 >Subject: [PATCH] Bug 38744: Add more missing txn > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/db_dependent/Koha/Biblio.t | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Biblio.t b/t/db_dependent/Koha/Biblio.t >index 90e8ed68c74..aa753903c09 100755 >--- a/t/db_dependent/Koha/Biblio.t >+++ b/t/db_dependent/Koha/Biblio.t >@@ -858,6 +858,8 @@ subtest 'get_marc_components() tests' => sub { > subtest 'get_components_query' => sub { > plan tests => 12; > >+ $schema->storage->txn_begin; >+ > my $biblio = $builder->build_sample_biblio(); > my $biblionumber = $biblio->biblionumber; > my $record = $biblio->metadata->record; >@@ -895,11 +897,16 @@ subtest 'get_components_query' => sub { > is($comp_sort, "title_asc", "$engine: UseControlNumber enabled with MarcOrgCode sort if correct"); > $record->delete_field($marc_003_field); > } >+ >+ $schema->storage->txn_rollback; >+ > }; > > subtest 'get_volumes_query' => sub { > plan tests => 3; > >+ $schema->storage->txn_begin; >+ > my $biblio = $builder->build_sample_biblio(); > my $biblionumber = $biblio->biblionumber; > my $record = $biblio->metadata->record; >@@ -940,6 +947,8 @@ subtest 'get_volumes_query' => sub { > "(((rcn:$biblionumber AND cni:OSt) OR rcn:\"OSt $biblionumber\") NOT (bib-level:a OR bib-level:b))", > "UseControlNumber enabled with MarcOrgCode" > ); >+ >+ $schema->storage->txn_rollback; > }; > > subtest 'generate_marc_host_field' => sub { >@@ -1014,8 +1023,9 @@ subtest 'generate_marc_host_field' => sub { > is( $link->subfield('y'), undef, 'MARC::Field->subfield(w) returns undef if 010a is empty' ); > is( $link->subfield('0'), '1234', 'MARC::Field->subfield(0) returns content from 001' ); > >- $schema->storage->txn_rollback; > t::lib::Mocks::mock_preference( 'marcflavour', 'MARC21' ); >+ >+ $schema->storage->txn_rollback; > }; > > subtest 'link_marc_host' => sub { >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38744
:
175653
|
176883
|
176887
|
176894
| 176895