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;