From cc661c6b028115b62b9ed61b4edfcb974109aa6f Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Thu, 19 Jan 2017 05:19:48 +0000 Subject: [PATCH] Bug 17917: Fix Cache issue with t/db_dependent/Reserves.t Forcing a cache flush makes the age restriction tests work. TEST PLAN --------- $ sudo koha-shell -c "prove t/db_dependent/Reserves.t" kohadev -- fails -- apply this patch $ sudo koha-shell -c "prove t/db_dependent/Reserves.t" kohadev -- succeeds -- run koha qa test tools --- t/db_dependent/Reserves.t | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t index c4d0f16..67d3f18 100755 --- a/t/db_dependent/Reserves.t +++ b/t/db_dependent/Reserves.t @@ -32,6 +32,7 @@ use C4::Circulation; use C4::Items; use C4::Members; use C4::Reserves; +use Koha::Cache; use Koha::DateUtils; use Koha::Holds; use Koha::Libraries; @@ -52,6 +53,10 @@ my $builder = t::lib::TestBuilder->new; # Somewhat arbitrary field chosen for age restriction unit tests. Must be added to db before the framework is cached $dbh->do("update marc_subfield_structure set kohafield='biblioitems.agerestriction' where tagfield='521' and tagsubfield='a'"); +# Attempt to reforce the cache to fill with this new structure record. +my $cache = Koha::Cache->new(); +$cache->flush_all(); + ## Setup Test # Add branches my $branch_1 = $builder->build({ source => 'Branch' })->{ branchcode }; -- 2.1.4