Bugzilla – Attachment 126052 Details for
Bug 28734
Koha::Biblio->get_marc_notes should parse authorised values
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28734: Clear cache to prevent random failures
Bug-28734-Clear-cache-to-prevent-random-failures.patch (text/plain), 2.43 KB, created by
Jonathan Druart
on 2021-10-12 07:13:19 UTC
(
hide
)
Description:
Bug 28734: Clear cache to prevent random failures
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-10-12 07:13:19 UTC
Size:
2.43 KB
patch
obsolete
>From 1ecb98a81e7ce59ef1c5588041b5cfedd419c280 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 12 Oct 2021 09:10:58 +0200 >Subject: [PATCH] Bug 28734: Clear cache to prevent random failures > >MSS is modified, we must clear the cache before and after > > # Failed test 'Authorised value is correctly parsed to show description rather than code' > # at t/db_dependent/Koha/Biblio.t line 617. > # got: 'CODE' > # expected: 'Description should show' > > # Failed test 'Authorised value is correctly parsed for OPAC to show description rather than code' > # at t/db_dependent/Koha/Biblio.t line 624. > # got: 'CODE' > # expected: 'Description should show OPAC' > # Looks like you failed 2 tests of 13 >--- > t/db_dependent/Koha/Biblio.t | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > >diff --git a/t/db_dependent/Koha/Biblio.t b/t/db_dependent/Koha/Biblio.t >index 893608d9330..f294606f30e 100755 >--- a/t/db_dependent/Koha/Biblio.t >+++ b/t/db_dependent/Koha/Biblio.t >@@ -21,6 +21,7 @@ use Test::More tests => 16; > > use C4::Biblio qw( AddBiblio ModBiblio ); > use Koha::Database; >+use Koha::Caches; > use Koha::Acquisition::Orders; > use Koha::AuthorisedValueCategories; > use Koha::AuthorisedValues; >@@ -605,6 +606,12 @@ subtest 'get_marc_notes() MARC21 tests' => sub { > my $mss = Koha::MarcSubfieldStructures->find({tagfield => "590", tagsubfield => "a", frameworkcode => $biblio->frameworkcode }); > $mss->update({ authorised_value => "TEST" }); > >+ my $cache = Koha::Caches->get_instance; >+ $cache->clear_from_cache("MarcStructure-0-"); >+ $cache->clear_from_cache("MarcStructure-1-"); >+ $cache->clear_from_cache("default_value_for_mod_marc-"); >+ $cache->clear_from_cache("MarcSubfieldStructure-"); >+ > C4::Biblio::ModBiblio( $record, $biblio->biblionumber ); > $biblio = Koha::Biblios->find( $biblio->biblionumber); > >@@ -624,6 +631,11 @@ subtest 'get_marc_notes() MARC21 tests' => sub { > is( $notes->[4]->{marcnote}, 'Description should show OPAC', 'Authorised value is correctly parsed for OPAC to show description rather than code' ); > is( @$notes, 5, 'No more notes' ); > >+ $cache->clear_from_cache("MarcStructure-0-"); >+ $cache->clear_from_cache("MarcStructure-1-"); >+ $cache->clear_from_cache("default_value_for_mod_marc-"); >+ $cache->clear_from_cache("MarcSubfieldStructure-"); >+ > $schema->storage->txn_rollback; > }; > >-- >2.25.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 28734
:
123016
|
123346
|
123349
|
124231
|
125574
|
125575
|
125634
|
125635
|
125660
|
125661
|
125662
|
125663
|
125687
|
125724
|
125725
| 126052