From cd60d6770b3b0b2b72049715892d796011d12294 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 12 Nov 2019 17:15:35 +0100 Subject: [PATCH] Bug 24022: Prevent Session2.t to fail if run after Session.t Cache must be cleaned! Signed-off-by: Nick Clemens --- t/db_dependent/Koha/Z3950Responder/Session2.t | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/t/db_dependent/Koha/Z3950Responder/Session2.t b/t/db_dependent/Koha/Z3950Responder/Session2.t index b6f790b4f8..ece9bded6f 100644 --- a/t/db_dependent/Koha/Z3950Responder/Session2.t +++ b/t/db_dependent/Koha/Z3950Responder/Session2.t @@ -17,6 +17,9 @@ my $schema = Koha::Database->new->schema; $schema->storage->txn_begin; +# Clear the cache, before and after +Koha::Caches->get_instance->flush_all; + subtest 'add_item_status' => sub { plan tests => 2; @@ -40,10 +43,6 @@ subtest 'add_item_status' => sub { } }); - # Clear the cache to make sure the above values take effect - my $cache = Koha::Caches->get_instance(); - $cache->flush_all(); - ## FIRST ITEM HAS ALL THE STATUSES ## my $item_1 = $builder->build({ source => 'Item', @@ -89,4 +88,7 @@ subtest 'add_item_status' => sub { }; +# Clear the cache, before and after +Koha::Caches->get_instance->flush_all; + $schema->storage->txn_rollback; -- 2.11.0